Closed florence-wolfe closed 1 year ago
@francis-robert I encountered following errors and warnings whilst checking this PR:
Labeled as following:
/games
/games/[game]
/games/[game]/{category}
/[username]/[game]
/[username]
As discussed previously, we should also make sure to add a 308 or 301 redirect due to the url change from
to make sure that search engines will be up to date.
✨ feat(app): add new game API routes and components for game details and filtering
🔧 refactor(about/page.tsx): update game link to use correct path New API routes have been added to fetch game data, global game data, and game category data. New components have been created to display game details, game header, and game filter. The game link in the About page has been updated to use the correct path for game details. This improves the user experience by providing more detailed information about games and allowing users to filter games by category.
✨ feat(game.tsx, game.types.ts, page.tsx): add new game components and types 📦 refactor: create new game components and types to improve code organization and modularity New game components and types have been added to better structure the code and improve modularity. This will make it easier to maintain and expand the application in the future. The new components include Game, GameHeader, GameFilter, and GameStats, as well as the corresponding types and context.
✨ feat(games): add new components for all-games feature These new components are added to display and filter all games in a more organized and user-friendly manner. The components include AllGamesCardBody, AllGamesCardHeader, AllGamesCard, AllGamesFilter, AllGamesImage, and AllGamesContext. This will improve the user experience when browsing and searching for games.
✨ feat(app): add all-games.tsx, load-more-button.component.tsx, page.tsx, and utilities.ts for game overview 🔧 refactor(app): update import paths and use encodeURI utility function 📦 chore(package.json): add next-nprogress-bar dependency
A new game overview feature has been added, which includes components for displaying all games, a load more button, and a page for the game overview. The import paths have been updated to use the new file structure, and the encodeURI utility function is now used for encoding URLs. The next-nprogress-bar dependency has been added to the package.json file to improve the loading experience.
🚚 refactor: update import paths and use encodeURI utility function 🌐 feat: add support for new URL structure in links The import paths have been updated to use the new "~app" alias, improving readability and maintainability. The encodeURI utility function is now used for encoding URLs, providing a more consistent approach. The URL structure in links has been updated to support the new "/games" path, ensuring correct navigation within the application.
🔄 refactor(utils/uri): replace encodeURIComponent with encodeURI for consistency 🗑️ remove(api): delete unused API routes for games and game categories The encodeURI function is now used consistently across the codebase, improving readability and maintainability. Unused API routes for games and game categories have been removed, reducing code clutter and potential confusion.
🔧 refactor(change-appearance.tsx): replace encodeURIComponent with custom encodeURI function The custom encodeURI function is used to improve consistency across the codebase and to ensure that the URI encoding is handled in a uniform manner. This change makes it easier to maintain and update the URI encoding logic in the future.
🔥 remove(game/[game].tsx): delete unused game page component The game page component is no longer needed as it has been replaced by a more efficient and modular implementation. This removal helps to keep the codebase clean and maintainable.
🔥 remove(pages/games.tsx): delete unused games.tsx file 🐛 fix(tournaments/[tournament].tsx): use custom encodeURI function to prevent double encoding ✨ feat(utils/uri.ts): add custom encodeURI function to handle URI encoding
The games.tsx file is no longer needed and has been removed. The custom encodeURI function has been added to utils/uri.ts to handle URI encoding and prevent double encoding issues. This function is now used in tournaments/[tournament].tsx to ensure proper encoding.
❗breaking: Changed default category from
all-categories
to*
to make it easier to distinguish and filter on the server side. ❗breaking: Moved the/game/[game]
routes to/games/[game]