Skip to content

Commit

Permalink
Updated grunts, fixed homescreen info
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianCheung1 committed Oct 30, 2023
1 parent e44ffe4 commit 8ca2d77
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 93 deletions.
2 changes: 1 addition & 1 deletion app/api/pokemons/pokemon/[pokemon_name]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ async function getCurrentMoves(pokemonName: string) {
const dps = pokemonTypes.includes(moveDetails.type.toLowerCase())
? (moveDetails.power / moveDetails.duration) * 1.2 * 1000
: (moveDetails.power / moveDetails.duration) * 1000
const dpe = Math.abs(moveDetails.power / moveDetails.energy_delta)
const dpe = pokemonTypes.includes(moveDetails.type.toLowerCase()) ? Math.abs(moveDetails.power / moveDetails.energy_delta) * 1.2 : Math.abs(moveDetails.power / moveDetails.energy_delta)
const eps = (moveDetails.energy_delta / moveDetails.duration) * 1000
return {
name: moveDetails.name,
Expand Down
15 changes: 5 additions & 10 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import { Container, Flex, Title, Text } from "@mantine/core"
import { Container, Flex, Title, Text, Stack } from "@mantine/core"
import { SearchBar } from "@/components/SearchBar"
import { NavBar } from "@/components/NavBar"
import { Info } from "@/components/Info"

export default function Home() {
return (
<Container fluid className="w-full">
<Flex
className="h-[calc(100vh-100px)]"
justify="center"
align="center"
direction="column"
>
<Container fluid>
<NavBar />
<Stack align="center" justify="center" className="h-[calc(100vh-100px)]">
<Text
size="calc(5rem * var(--mantine-scale))"
fw={900}
Expand All @@ -20,10 +16,9 @@ export default function Home() {
>
PokeData
</Text>
<NavBar />
<SearchBar />
<Info />
</Flex>
</Stack>
</Container>
)
}
18 changes: 16 additions & 2 deletions components/Info.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
import { Breadcrumbs, Anchor, Container, Flex } from "@mantine/core"
import { Breadcrumbs, Anchor, Stack } from "@mantine/core"

export const Info = () => {
const items = [
{ title: "Pogoapi.net", href: "https://pogoapi.net/" },
{ title: "Pokeapi.co", href: "https://pokeapi.co/" },
{ title: "ScrapedDuck", href: "https://github.com/bigfoott/ScrapedDuck" },
].map((item, index) => (
<Anchor href={item.href} key={index} target="_blank">
{item.title}
</Anchor>
))

const items2 = [
{ title: "LeekDuck", href: "https://leekduck.com/" },
{ title: "PogoInfo", href: "https://github.com/ccev/pogoinfo" },
].map((item, index) => (

<Anchor href={item.href} key={index} target="_blank">
{item.title}
</Anchor>
))
return <Breadcrumbs>{items}</Breadcrumbs>

return (
<Stack justify="center" align="center">
<Breadcrumbs>{items}</Breadcrumbs>
<Breadcrumbs>{items2}</Breadcrumbs>
</Stack>
)
}
9 changes: 2 additions & 7 deletions components/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
IconSearch,
IconPokeball,
IconCalendarEvent,
IconSwords
IconSwords,
} from "@tabler/icons-react"
import { useDisclosure } from "@mantine/hooks"
import { ColorSchemeToggle } from "./ColorSchemeToggle"
Expand Down Expand Up @@ -57,12 +57,7 @@ export const NavBar = () => {

return (
<>
<Drawer
opened={opened}
onClose={close}
title="Menu"
size="xs"
>
<Drawer opened={opened} onClose={close} title="Menu" size="xs">
<Box w={220}>{items}</Box>
<ColorSchemeToggle />
</Drawer>
Expand Down
115 changes: 42 additions & 73 deletions libs/grunts.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,8 @@
"team": [
[
{
"id": 103,
"template": "EXEGGUTOR_NORMAL",
"form": 77
"id": 147,
"template": "Dratini"
},
{
"id": 443,
Expand Down Expand Up @@ -414,11 +413,6 @@
"id": 281,
"template": "KIRLIA_NORMAL",
"form": 295
},
{
"id": 210,
"template": "GRANBULL_NORMAL",
"form": 1256
}
],
[
Expand Down Expand Up @@ -465,8 +459,8 @@
"team": [
[
{
"id": 237,
"template": "Hitmontop"
"id": 215,
"template": "Sneasel"
},
{
"id": 106,
Expand Down Expand Up @@ -537,9 +531,8 @@
"template": "NUMEL"
},
{
"id": 255,
"template": "TORCHIC_NORMAL",
"form": 1358
"id": 607,
"template": "Litwick"
},
{
"id": 37,
Expand Down Expand Up @@ -707,8 +700,8 @@
"form": 265
},
{
"id": 252,
"template": "TREECKO"
"id": 69,
"template": "Bellsprout"
}
],
[
Expand Down Expand Up @@ -771,8 +764,8 @@
"team": [
[
{
"id": 231,
"template": "PHANPY"
"id": 529,
"template": "Drilbur"
},
{
"id": 194,
Expand All @@ -786,8 +779,8 @@
"form": 888
},
{
"id": 232,
"template": "DONPHAN"
"id": 111,
"template": "Rhyhorn"
}
],
[
Expand Down Expand Up @@ -842,6 +835,10 @@
"template": "SANDSLASH_NORMAL",
"form": 53
},
{
"id": 38,
"template": "Ninetales"
},
{
"id": 459,
"template": "SNOVER_NORMAL",
Expand Down Expand Up @@ -1142,14 +1139,12 @@
"template": "Geodude"
},
{
"id": 347,
"template": "ANORITH_NORMAL",
"form": 1574
"id": 408,
"template": "Cranidos"
},
{
"id": 345,
"template": "LILEEP_NORMAL",
"form": 1568
"id": 410,
"template": "Shieldon"
}
],
[
Expand All @@ -1170,16 +1165,6 @@
}
],
[
{
"id": 95,
"template": "ONIX_NORMAL",
"form": 902
},
{
"id": 208,
"template": "STEELIX_NORMAL",
"form": 905
},
{
"id": 76,
"template": "GOLEM_NORMAL",
Expand All @@ -1206,18 +1191,17 @@
"team": [
[
{
"id": 258,
"template": "MUDKIP_NORMAL",
"form": 205
"id": 90,
"template": "Shellder"
},
{
"id": 54,
"template": "PSYDUCK_NORMAL",
"form": 286
},
{
"id": 320,
"template": "WAILMER"
"id": 339,
"template": "Barboach"
}
],
[
Expand All @@ -1238,11 +1222,6 @@
"template": "FERALIGATR_NORMAL",
"form": 1142
},
{
"id": 55,
"template": "GOLDUCK_NORMAL",
"form": 289
},
{
"id": 321,
"template": "WAILORD"
Expand Down Expand Up @@ -1308,8 +1287,8 @@
"team": [
[
{
"id": 142,
"template": "Aerodactyl"
"id": 147,
"template": "Dratini"
}
],
[
Expand Down Expand Up @@ -1357,8 +1336,8 @@
"team": [
[
{
"id": 190,
"template": "Aipom"
"id": 69,
"template": "Bellsprout"
}
],
[
Expand Down Expand Up @@ -1406,23 +1385,22 @@
"team": [
[
{
"id": 74,
"template": "Geodude"
"id": 302,
"template": "Sableye"
}
],
[
{
"id": 208,
"template": "Steelix",
"form": 1664
"id": 227,
"template": "Skarmory"
},
{
"id": 282,
"template": "Gardevoir"
},
{
"id": 302,
"template": "Sableye"
"id": 89,
"template": "Muk"
}
],
[
Expand All @@ -1436,8 +1414,8 @@
"template": "Gyarados"
},
{
"id": 71,
"template": "VictreebelL"
"id": 230,
"template": "Kingdra"
}
]
]
Expand Down Expand Up @@ -1478,8 +1456,8 @@
],
[
{
"id": 377,
"template": "Regirock"
"id": 486,
"template": "Regigigas"
}
]
]
Expand Down Expand Up @@ -1568,8 +1546,8 @@
"team": [
[
{
"id": 425,
"template": "DRIFLOON"
"id": 92,
"template": "Gastly"
},
{
"id": 353,
Expand Down Expand Up @@ -1605,9 +1583,8 @@
"form": 920
},
{
"id": 354,
"template": "BANETTE_NORMAL",
"form": 911
"id": 94,
"template": "Gengar"
},
{
"id": 623,
Expand Down Expand Up @@ -1659,10 +1636,6 @@
}
],
[
{
"id": 405,
"template": "LUXRAY"
},
{
"id": 181,
"template": "AMPHAROS_NORMAL",
Expand Down Expand Up @@ -1828,10 +1801,6 @@
{
"id": 50,
"template": "Diglett"
},
{
"id": 27,
"template": "Sandshrew"
}
],
[
Expand Down

0 comments on commit 8ca2d77

Please sign in to comment.