Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

Entertainment web app (Next.js & TailwindCSS & TMDB API)

next, tailwind-css
h2y•160
@hooiyan
A solution to the Entertainment web app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hey guys! Here's my solution for the entertainment web app.

I've integrated TMDB API into this challenge, you can actually search for both movies and tv series with real data! You can also click on each item to view its details.

I plan to make it my resume project. I'm going to apply for my first developer job soon, very excited and nervous at the same time!

There are some features that I haven't implemented yet. For example, I have pagination on some pages but it won't update the URL, which means if the user navigates to the next page, and click on an item, and then if they wish to go back, it will always start from the first page.

Also, I removed the bookmark page and the video playing feature. But they are on my to-do list. I hope I can improve them later on.

For now, I just want to push this out first and get some feedback from you guys! Thank you so much!

**I've noticed in the reports on FEM that I have many issues, I'll have to look into them.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Fazza Razaq Amiarso•2,320
    @fazzaamiarso
    Posted over 3 years ago

    Hello, hooiyan! First of all, I want to say that this is an impressive solution!

    I think I can give you suggestion to help you with pagination.

    1. Use Link as pagination button which will set query params (e.g /search/avengers?page=2).
    2. Get the current page from URL with useRouter i.e. { id, page } = router.query or maybe you can do the same thing as above, but fetch all the data using getServerSideProps.

    Here is what my contrived implementation would look like.

    export async function getServerSideProps ({query, params}) {
     { id } = params
    { page } = query
    const url = searchAll(id) + `&page=${page}`;
    
    const res = await fetch(url);
    const results = res.json();
    
    return { props : { data : results } } 
    }
    
    export default function SearchedAll({data}) {
    const router = useRouter
    const { page: currentPage, id: searchTerm } = router.query // assuming your URL /search/bla?page=2
    
     const filteredResults = data
        ? data.results.filter(item => item.media_type !== 'person')
        : []
    ...
    <Link to={`/search/${searchTerm}?page=${Number(currentPage) - 1}`}>Prev Page</Link>
    }
    <Link to={`/search/${searchTerm}?page=${Number(currentPage) + 1}`}>Next Page</Link>
    }
    

    I hope my suggestions could help, Sorry if it is too contrived🙏. Goodluck on your job application!

    Marked as helpful
  • Oluwamuyiwa Samuel Adepoju•70
    @codermuyi
    Posted about 3 years ago

    You've just inspired me big time!! Btw, You should probably add cursor: pointer to the clickable images.

  • cloud-alfakhre•480
    @cluod-Alfakhre
    Posted almost 3 years ago

    great job and well designed 👏🎉. how did you deploy your app with server side rendering? i have tried firebase but cloudFunctions wasn't free

  • Diop Nikuze•125
    @Diop-Nikuze
    Posted about 3 years ago

    Hey, your work is amazing, really liked it 🙌🏽🙌🏽

  • Naser Y Abdulkadir•190
    @naser23
    Posted about 3 years ago

    hello! the project looks really good! I was looking for an api for this type of project and found this api. I chose not to go with it because they ask for a lot of personal info on the sign up process (address, phone number, etc...). Since you signed up with it. Has anything changed regarding your privacy (like more spam emails, phone calls, or random mail)? I really want to use this api but I want to make sure its safe to use before i dive in.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub