دعم الموقع

Hello everyone!

So, I'll try to keep this as short as possible even tho I don't know how possible it's gonna be. I'm trying to create an app that shows the 20 top rated movies and 20 upcoming movies on the front page when you open the app. Easy enough. I also have a search bar at the top where I can search for movies and get the results back. The issue is that I'm quite new to React and Frontend development in general (and programming too, I haven't really been programming too much) and I just don't know how to solve the issue I have. I also realized that I might have posted this in the wrong category first.

The issue is that, when I search for a movie, I want React to render a different component and take me to a different route, for example http://localhost:3000/searchresults/:keyword or something like that. I know how to set that up in App.js, with the routes and all that, but I just can't get it to work. Most recently, the issue is that I'm getting some sort of an error that the results I'm getting back from the API don't exist, or that they're undefined. Again, I'm not very good at this so I'm having some trouble with understanding what's wrong and what do I actually have to do to fix the issue.

If anyone could and would want to help, I'd love to hear your suggestions! I can give you the link to my GitHub repository so that you can download the code and maybe identify the issue in that way. Once again, I am very much aware that my code looks quite ugly, there's a lot of things that could and should be broken up in separate components or even some things that don't even make sense. I've been using ChatGPT to help me out with stuff and it's been quite useful so far, except that I'm stuck now and don't know how to solve this issue. Also, I'm aware that you should normally hide your API key or API Read Access Token, but I don't think I need to hide it right now.

https://github.com/IITheGameII/movie-app

Edit: Someone pointed out that I wasn't returning the res.json() in line and that's why I was getting undefined. Unfortunately, I still haven't been able to solve my entire issue with the app, showing the results in a separate component and all that, but this is a good start

لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها

عام

s ركز شريط البحث
p افتح قائمة الملف الشخصي
esc اغلق النافذة المفتوحة
? افتح نافذة اختصارات لوحة المفاتيح

على كافة صفحات الوسائط

b ارجع للخلف (او للصفحة الام عند التطبيق)
e انتقل لصفحة التعديل

على كافة صفحات موسم المسلسل

(السهم الايمن) انتقل للموسم التالي
(السهم الايسر) انتقل للموسم السابق

على كافة صفحات حلقة المسلسل

(السهم الايمن) انتقل للحلقة التالية
(السهم الايسر) انتقل للحلقة السابقة

على كافة صفحات الصور

a افتح صفحة اضافة الصورة

على كافة صفحات التعديل

t افتح محدد الترجمة
ctrl+ s ارسال النموذج

على صفحات المناقشة

n انشى نقاش جديد
w تبديل حالة المتابعة
p تبديل عام / خاص
c تبديل اغلاق / فتح
a افتح الانشطة
r رد على النقاش
l انتقل لأخر رد
ctrl+ enter أرسل رسالتك
(السهم الايمن) الصفحة التالية
(السهم الايسر) الصفحة السابقة

الاعدادات

هل تريد تقييم او اضافة هذا العنصر للقائمة؟

تسجيل الدخول