-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bind get games from game store api
- Loading branch information
1 parent
3b70f3f
commit c7c4ff6
Showing
8 changed files
with
189 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
export interface Minigame { | ||
export interface MinigamePublisher { | ||
website: string; | ||
updated_at: string; | ||
name: string; | ||
inserted_at: string; | ||
id: string; | ||
src: string; | ||
eth_address: string; | ||
country: string; | ||
} | ||
export interface Minigame { | ||
version: string; | ||
updated_at: string; | ||
thumbnail: string; | ||
tags: string[]; | ||
status: string; | ||
runner_url: string; | ||
publisher: MinigamePublisher; | ||
platform: string; | ||
name: string; | ||
inserted_at: string; | ||
id: string; | ||
icon: string; | ||
description: string; | ||
type: "browser"; | ||
tags: string[]; | ||
thumbnailSrc: string; | ||
logoSrc: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import clsx from "clsx"; | ||
|
||
interface Props { | ||
page: number; | ||
className?: string; | ||
isLastPage?: boolean; | ||
hideOnSinglePage?: boolean; | ||
onChange: (page: number) => void; | ||
} | ||
|
||
export const Pagination = (props: Props) => { | ||
const { page, className, isLastPage, hideOnSinglePage, onChange } = props; | ||
|
||
if (hideOnSinglePage && isLastPage && page === 1) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div className={clsx("flex items-center space-x-2", className)}> | ||
<span className="font-medium">Page {page}</span> | ||
<span>-</span> | ||
<button | ||
type="button" | ||
disabled={page === 1} | ||
onClick={() => onChange(page - 1)} | ||
className="disabled:opacity-30 underline" | ||
> | ||
Prev | ||
</button> | ||
<span>-</span> | ||
<button | ||
type="button" | ||
disabled={isLastPage} | ||
onClick={() => onChange(page + 1)} | ||
className="disabled:opacity-30 underline" | ||
> | ||
Next | ||
</button> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
export const MinigameGridSkeleton = () => { | ||
return ( | ||
<div className="grid grid-cols-2 2xl:grid-cols-3 gap-6 animate-pulse"> | ||
{new Array(2).fill(0).map((_, index) => { | ||
return ( | ||
<div className="grid-cols-1 rounded bg-white/10" key={index}> | ||
<div className="w-full aspect-16/9 bg-white/10" /> | ||
<div className="p-2 2xl:p-4 flex flex-col space-y-2"> | ||
<div className="flex gap-2 items-center"> | ||
<div className="w-8 h-8 bg-white/10" /> | ||
<div className="w-24 h-8 bg-white/10" /> | ||
</div> | ||
<div className="h-16 bg-white/10" /> | ||
<div className="bg-white/10 h-6 w-24" /> | ||
<div className="flex justify-between gap-4"> | ||
<div className="flex items-center gap-1 flex-1 overflow-hidden relative after:block after:content-none after:absolute "> | ||
{new Array(3).fill(0).map((_, index) => { | ||
return ( | ||
<span className="w-16 h-6 bg-white/10" key={index} /> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
})} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2001,6 +2001,11 @@ | |
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" | ||
integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== | ||
|
||
"@popperjs/core@^2.9.0": | ||
version "2.11.6" | ||
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.6.tgz#cee20bd55e68a1720bdab363ecf0c821ded4cd45" | ||
integrity sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw== | ||
|
||
"@remix-run/[email protected]": | ||
version "1.12.0" | ||
resolved "https://registry.yarnpkg.com/@remix-run/dev/-/dev-1.12.0.tgz#b2e5791d5a526849c74c5e15ddf1eb8737a70de7" | ||
|
@@ -2425,6 +2430,13 @@ | |
resolved "https://registry.yarnpkg.com/@tanstack/virtual-core/-/virtual-core-3.0.0-beta.49.tgz#058d876a4ccdb1c980b24b39824a8eae2a438791" | ||
integrity sha512-tPmuUiQwUW3PdQirBjlqeZD1JMn7bcyNE6stS50RUu5vyopzLFALnN0uTBftrZOcHpkRtYVa0ifz9fB9yKKJYw== | ||
|
||
"@tippyjs/react@^4.2.6": | ||
version "4.2.6" | ||
resolved "https://registry.yarnpkg.com/@tippyjs/react/-/react-4.2.6.tgz#971677a599bf663f20bb1c60a62b9555b749cc71" | ||
integrity sha512-91RicDR+H7oDSyPycI13q3b7o4O60wa2oRbjlz2fyRLmHImc4vyDwuUP8NtZaN0VARJY5hybvDYrFzhY9+Lbyw== | ||
dependencies: | ||
tippy.js "^6.3.1" | ||
|
||
"@tootallnate/once@1": | ||
version "1.1.2" | ||
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" | ||
|
@@ -9752,6 +9764,13 @@ [email protected]: | |
dependencies: | ||
convert-hrtime "^3.0.0" | ||
|
||
tippy.js@^6.3.1: | ||
version "6.3.7" | ||
resolved "https://registry.yarnpkg.com/tippy.js/-/tippy.js-6.3.7.tgz#8ccfb651d642010ed9a32ff29b0e9e19c5b8c61c" | ||
integrity sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ== | ||
dependencies: | ||
"@popperjs/core" "^2.9.0" | ||
|
||
tmp@^0.0.33: | ||
version "0.0.33" | ||
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" | ||
|