„The Movie Database“ palaikymas

For context, I am following the Clever Programming React.js tutorial for the Netflix clone. When I try to load images for the movies, the images do not load and opening the console reveals "ERR_SSL_PROTOCOL_ERROR". This happens for every image I attempt to load so I don't think it has to do with images being removed from the site. Here's my code:

const base_url = "https://image.tmbd.org/t/p/original";

const [movies, setMovies] = useState([]);
useEffect(() => {
        async function fetchData(){
            const request = await axios.get(fetchUrl); 
            setMovies(request.data.results);
            console.log(request.data.results);
            return request;
        }
        fetchData();
    }, [fetchUrl]);

I try to set the img src of each movie to the base_url concatenated with the movie poster path from request.data.results. I would put the code here but I can't do it without causing an error on this site.

I've also tried changing the base_url so that it starts with "http" instead of "https" but that just returned an empty response error. Any help is appreciated!

EDIT: I cannot post my complete code because every time I try I get an error from this site saying "There was a problem" with no further information. Would be nice to know what is causing this vague problem so that I can properly explain my issue.

EDIT 2: Here is a link to my code on pastebin since I cannot post it here for whatever reason

2 atsakė (on page 1 iš 1)

Jump to last post

@journiem said:

const base_url = "https://image.tmbd.org/t/p/original";

Is that the URL you are using? If so, you have a typo:

const base_url = "https://image.tmdb.org/t/p/original";

Would be what you're looking for, you mispelled tmdb.

man_facepalming_tone4 How embarrassing, that fixed it. Thank you for your help.

Negalite rasti filmo ar TV laidos? Prisijunkite, kad sukurtumėte.

Bendras

s susitelkti į paieškos juostą
p profilio meniu
esc uždarykite atidarytą langą
? spartieji klavišai

Medijų puslapiuose

b grįžkite atgal (arba tėvams leidus)
e į redagavimo puslapį

TV sezono puslapiuose

(dešinė rodyklė) sekantis sezonas
(kairė rodyklė) ankstesnis sezonas

TV epizodo puslapiuose

(dešinė rodyklė) sekantis epizodas
(kairė rodyklė) ankstesnis epizodas

Visuose atvaizdžio puslapiuose

a atverti atvaizdžio pridėjimo langą

Visuose redagavimo puslapiuose

t vertimo parinktys
ctrl+ s pateikti formą

Diskusijų puslapiuose

n sukurti naują diskusiją
w perjungti peržiūros būseną
p perjungti viešasis / privatus
c perjungti uždaryti / atidaryti
a peržiūrėti aktyvumą
r atsakyti į pokalbį
l į paskutinį atsakymą
ctrl+ enter pateikti pranešimą
(dešinė rodyklė) sekantis puslapis
(kairė rodyklė) ankstesnis puslapis

Nustatymai

Norite įvertinti ar įtraukti šį elementą į sąrašą?

Prisijungti