marwinburesch / moviescout Goto Github PK
View Code? Open in Web Editor NEWMovies for days
Movies for days
We've recently added the useLocalStorage
hook, now it's time to implement it for the bookmarks. Ideally, we want to store the user's bookmarks in localStorage
as a list of id
s of movies and fetch once the user gets to the page. If there aren't any bookmarks, we should display at least a message saying so.
After some thoughts, it would probably be best practice to have a dedicated API endpoint for fetching a list of movies based on a list of id
s.
Property 'id' is missing in type '{ children: string; layout: "detail"; title: string; rating: number; genres: string[]; image: string; onBookmarkClick: () => void; }' but required in type 'CardProps'.
We get this error on visiting /
Warning: Each child in a list should have a unique "key" prop.
Check the render method of `Rating`. See https://reactjs.org/link/warning-keys for more information.
at RatingIcon (http://localhost:3000/src/app/components/RatingIcon/RatingIcon.tsx:19:3)
at Rating (http://localhost:3000/src/app/components/Rating/Rating.tsx:20:3)
at div
at section
at article
at Card (http://localhost:3000/src/app/components/Card/Card.tsx:21:3)
at section
at div
at div
at Home (http://localhost:3000/src/app/pages/Home/Home.tsx:98:41)
at Route2 (http://localhost:3000/node_modules/.vite/chunk-ZAVVHJXD.js?v=b286ad33:1729:29)
at Switch2 (http://localhost:3000/node_modules/.vite/chunk-ZAVVHJXD.js?v=b286ad33:1873:29)
at Router2 (http://localhost:3000/node_modules/.vite/chunk-ZAVVHJXD.js?v=b286ad33:1455:30)
at BrowserRouter2 (http://localhost:3000/node_modules/.vite/react-router-dom.js?v=b286ad33:54:35)
at App
The error describes how the stack collapsed. More about that here
searchResult
and setSearchResult
imply that we already received results. Let's rename them to searchValue
and setSearchValue
This shouldn't be done here in the component itself, but rather at least a level higher up
Saw that the project doesn't have a README
. Maybe you find the time adding one.
Here is a very good template I used in one of my repos.
As a user
I want to have a profile
so I can have a centralized place for all my details
details details details
Sometimes a component is exported right at the function declaration, sometimes at the end of the file.
We decided to have components and pages exported right at the function declaration.
<svg height="24" viewBox="0 0 24 24" width="24" {...propsNoStarIconProps}>
the viewBox is hardcoded in the StarIcon.tsx
, but can't be controlled through the Rating
-component.
This forces pages to have extra elements just for styling
Genre is required, but all
is not a genre.
Our API-endpoint is not able to handle all
Link to discover API documentation
I think, that could be a problem. Or did I miss something!
Rename movie button to a more appropriate name. Maybe IconButton?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.