Skip to content

Commit

Permalink
Merge pull request #9 from JollyGrin/feat/api-decks
Browse files Browse the repository at this point in the history
Feat/api decks
  • Loading branch information
JollyGrin authored Sep 9, 2024
2 parents c329dc3 + d51c6a5 commit b5d70e6
Show file tree
Hide file tree
Showing 13 changed files with 308 additions and 54 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"@dnd-kit/sortable": "^8.0.0",
"@radix-ui/react-dialog": "^1.1.1",
"@shadow-panda/style-context": "^0.7.1",
"@tanstack/react-query": "^5.55.4",
"@tanstack/react-query-devtools": "^5.55.4",
"axios": "^1.7.7",
"next": "14.2.8",
"react": "^18",
"react-dom": "^18"
Expand Down
111 changes: 111 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/components/atoms/card-view/atlas.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { CARD_CDN } from "@/components/organisms/GameBoard/constants";
import { Box } from "styled-system/jsx";

export const FullCardAtlas = ({
Expand All @@ -15,7 +16,9 @@ export const FullCardAtlas = ({
isolation="isolate"
>
<Box
style={{ backgroundImage: `url(/mock-cards/${img})` }} // bgImage has caching issues
style={{
backgroundImage: `url(${CARD_CDN}/${img}.webp)`,
}} // bgImage has caching issues
isolation="isolate"
w="100%"
h="100%"
Expand Down
5 changes: 4 additions & 1 deletion src/components/atoms/card-view/card.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { CARD_CDN } from "@/components/organisms/GameBoard/constants";
import { Box } from "styled-system/jsx";

export const CardImage = ({
Expand All @@ -22,7 +23,9 @@ export const CardImage = ({
transition="all 0.25s ease"
>
<Box
style={{ backgroundImage: `url(/mock-cards/${img})` }}
style={{
backgroundImage: `url(${CARD_CDN}/${img}.webp)`,
}}
w="100%"
h="100%"
minH="300px"
Expand Down
5 changes: 4 additions & 1 deletion src/components/atoms/mock-cards/atlas.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { CARD_CDN } from "@/components/organisms/GameBoard/constants";
import { Box } from "styled-system/jsx";

export const CardAtlas = ({
Expand All @@ -20,7 +21,9 @@ export const CardAtlas = ({
style={{ height }}
>
<Box
style={{ backgroundImage: `url(/mock-cards/${img})` }} // bgImage has caching issues
style={{
backgroundImage: `url(${CARD_CDN}/${img}.webp)`,
}} // bgImage has caching issues
isolation="isolate"
h="310px"
w="100%"
Expand Down
3 changes: 2 additions & 1 deletion src/components/atoms/mock-cards/card.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { CARD_CDN } from "@/components/organisms/GameBoard/constants";
import { useHover } from "@/utils/hooks/useHover";
import { useKeyPress } from "@/utils/hooks/useKeyPress";
import { useEffect, useRef, useState } from "react";
Expand Down Expand Up @@ -62,7 +63,7 @@ export const CardImage = ({
transform={show ? "scale(1.5)" : "unset"}
transition="all 0.25s ease"
style={{
backgroundImage: `url(/mock-cards/${img})`,
backgroundImage: `url(${CARD_CDN}/5/${img}.webp)`,
}}
/>{" "}
</Box>
Expand Down
Loading

0 comments on commit b5d70e6

Please sign in to comment.