From 3ffc5f05d72a7d2ab8488680ce5a8407a66d6acb Mon Sep 17 00:00:00 2001 From: Ayush Bhardwaj Date: Sat, 19 Sep 2026 01:32:28 +0200 Subject: [PATCH] chore: run prettier on the whole project --- docs/Architecture/plan1_excalidraw.md | 14 ++++---- docs/README.md | 38 +++++++++++----------- src/App.tsx | 16 ++++++--- src/components/PokemonList/PokemonList.tsx | 2 +- src/controllers/pokemonController.ts | 3 +- 5 files changed, 41 insertions(+), 32 deletions(-) diff --git a/docs/Architecture/plan1_excalidraw.md b/docs/Architecture/plan1_excalidraw.md index a91ce89..068636e 100644 --- a/docs/Architecture/plan1_excalidraw.md +++ b/docs/Architecture/plan1_excalidraw.md @@ -1,27 +1,28 @@ --- - excalidraw-plugin: parsed tags: [excalidraw] - --- -==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving' +==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving' # Excalidraw Data ## Text Elements + Can ask for prev and next pokemon by ID Ignores filter ^Bia2RkBk Asks for a list of Pokemon (constant length) in order of -ID of current selected pokemon +- 1 until the list is full. -We need to fetch them for username and mby sprite. ^uOjU6oLM +ID of current selected pokemon +- 1 until the list is full. +We need to fetch them for username and mby sprite. ^uOjU6oLM Just displays values stored as favorites in same fasion as PokemonList. ^p0N1zaqQ %% + ## Drawing + ```compressed-json N4KAkARALgngDgUwgLgAQQQDwMYEMA2AlgCYBOuA7hADTgQBuCpAzoQPYB2KqATLZMzYBXUtiRoIACyhQ4zZAHoFAc0JRJQgEYA6bGwC2CgF7N6hbEcK4OCtptbErHALRY8RMpWdx8Q1TdIEfARcZgRmBShcZR5tHgAWbQBGGjoghH0EDihmbgBtcDBQMBKIEm4IZ2cADgARAAkAUWYjWo4ABmUAdmwAWUwAZVqATWIAZlSSyFhECoAzQIRPKn5S @@ -5421,4 +5422,5 @@ ncABODPCACpKsuwnn3d0Utw5mkAAsgCXBRb8A33clct33cP3eV3decr73dZwmp3d2AA57Q5AADAA7das v3dsPeHImzdOIYDw6ZwphPiD/3d5+ScRZEimsPef3cFbPOpCDADoPf9gDl3cDoApIlOokQADgAAiKC0AhchDAABSoAgABSoBAAA= ``` -%% \ No newline at end of file + +%% diff --git a/docs/README.md b/docs/README.md index 339935b..2f5eacc 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,11 +2,11 @@ This directory contains all the docs for this project. -- ./old_root_readme/ - Contains the original readme's that I deleted from root, so you may - read it if you wish +- ./old_root_readme/ + Contains the original readme's that I deleted from root, so you may + read it if you wish - Here is a `tree` of our tests, it cover all components and features. - + ```bash │   ├── pokemon.test.ts ├── App.test.tsx @@ -27,7 +27,7 @@ This directory contains all the docs for this project. ``` -All tests pass: +All tests pass: ![image of passed tests](./tests.png) @@ -35,32 +35,32 @@ All tests pass: ![plan1 driagram](./Architecture/plan1.png) -- Worksheet: +- Worksheet: + ```json { "Alberto Corvaglia": { - "7/9": "6 hours", - "8/9": "6 hours" + "7/9": "6 hours", + "8/9": "6 hours" }, "Ayush Bhardwaj": { - "11/9": "4 hours", - "14/9": "4 hours", - "16/9": "4 hours" - + "11/9": "4 hours", + "14/9": "4 hours", + "16/9": "4 hours" }, "Ilias Bouqdire": { - "8/9": "4 hours", - "9/9": "5 hours", - "18/9": "3 hours" + "8/9": "4 hours", + "9/9": "5 hours", + "18/9": "3 hours" }, "Thomas-Andre Hetlesaether": { - "8/9": "4 hours", - "13/9": "4 hours", - "14/9": "4 hours", - "18/9": "1 hour" + "8/9": "4 hours", + "13/9": "4 hours", + "14/9": "4 hours", + "18/9": "1 hour" } } ``` diff --git a/src/App.tsx b/src/App.tsx index acfcef3..7ea790a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,12 +9,20 @@ import { useFilters } from "./controllers/useFilters"; import { PokemonList } from "./components/PokemonList/PokemonList"; import { FavoritePokemon } from "./components/FavoritePokemon/FavoritePokemon"; import { Filter } from "./components/Filter/Filter"; -import { GetNextFiltered, GetPrevFiltered } from "./controllers/pokemonController"; +import { + GetNextFiltered, + GetPrevFiltered, +} from "./controllers/pokemonController"; export default function App() { const [currentId, setCurrentId] = useState(1); - const { favoriteIds, favoritePokemons, isFavorite, toggleFavorite, isLoadingFavorites } = - useFavorites(); + const { + favoriteIds, + favoritePokemons, + isFavorite, + toggleFavorite, + isLoadingFavorites, + } = useFavorites(); const { filters, setFilter, resetFilters } = useFilters(); const query = useQuery({ @@ -105,4 +113,4 @@ export default function App() { ); -} \ No newline at end of file +} diff --git a/src/components/PokemonList/PokemonList.tsx b/src/components/PokemonList/PokemonList.tsx index 0665ee7..3eeb837 100644 --- a/src/components/PokemonList/PokemonList.tsx +++ b/src/components/PokemonList/PokemonList.tsx @@ -144,4 +144,4 @@ async function buildPokemonList( } return pokemonList; -} \ No newline at end of file +} diff --git a/src/controllers/pokemonController.ts b/src/controllers/pokemonController.ts index 8b7134d..87184da 100644 --- a/src/controllers/pokemonController.ts +++ b/src/controllers/pokemonController.ts @@ -31,7 +31,6 @@ export function matchesFilter( rules: FilterRules, favoriteIds: number[] = [], ): boolean { - if (rules.onlyFavorites && !favoriteIds.includes(pokemon.id)) return false; if (rules.type && rules.type.length > 0) { const hasType = pokemon.types.some((t) => @@ -201,4 +200,4 @@ async function idsForType(type: string): Promise { } catch { return []; } -} \ No newline at end of file +}