Commit 654ac5dc by Arjun Jhukal

updated the game listing at user dashboard

parent 90544e7e
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
\ No newline at end of file
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<g clipPath="url(#a)">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1"
fill="#666" />
</g>
<defs>
<clipPath id="a">
<path fill="#fff" d="M0 0h16v16H0z" />
</clipPath>
</defs>
</svg>
\ No newline at end of file
import React from 'react'
export default function BonusGames() {
return (
<div>BonusGames</div>
)
}
import React from 'react'
export default function Loading() {
return (
<div>loading</div>
)
}
// app/(dashboard)/exclusive-games/[id]/page.tsx
import ExlusiveGameDetail from "@/components/pages/dashboard/userDashboard/games/exclusiveGames/exclusiveGameDetail";
import { getSingleGame } from "@/serverApi/game";
export default async function UserGameDetail({ params }: { params: { id: string } }) {
// const game = await getSingleGame(params.id);
// return <ExlusiveGameDetail game={game.data} />;
return <h1>Game detail</h1>
}
// app/games/loading.tsx
export default function Loading() {
return (
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4 animate-pulse">
{Array.from({ length: 6 }).map((_, i) => (
<div
key={i}
className="rounded-xl bg-gray-200 w-full h-[220px]"
/>
))}
</div>
);
}
import ExclusiveGamePage from '@/components/pages/dashboard/userDashboard/games/exclusiveGames'
import React from 'react'
export default function ExclusiveGames() {
return (
<ExclusiveGamePage/>
)
}
import PlayerDetailPage from '@/components/pages/dashboard/adminDashboard/players/playerDetail'
import React from 'react'
export default function PlayerDetail() {
return (
<PlayerDetailPage />
)
}
"use client";
import PageHeader from '@/components/molecules/PageHeader'
import AddPlayerForm from '@/components/pages/dashboard/adminDashboard/players/addPlayerForm';
import { useParams } from 'next/navigation';
import React from 'react'
export default function SinglePlayer() {
const params = useParams();
const id = params?.id as string;
return (
<>
<PageHeader />
<AddPlayerForm id={id} />
</>
)
}
import { Box, ClickAwayListener, Fade, IconButton, List, ListItem, Paper, Popper } from '@mui/material'
import { Box, Button, ClickAwayListener, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Fade, IconButton, List, ListItem, Paper, Popper } from '@mui/material'
import { More } from '@wandersonalwes/iconsax-react'
import Link from 'next/link';
import React, { useRef, useState } from 'react'
......@@ -8,12 +8,20 @@ export default function ActionGroup({
}: { onView?: string; onEdit?: string; onDelete?: () => void }) {
const anchorRef = useRef<HTMLButtonElement | null>(null)
const [open, setOpen] = useState(false);
const [confirmOpen, setConfirmOpen] = useState(false);
const handleToggle = () => setOpen((prev) => !prev);
const handleClose = (event: MouseEvent | TouchEvent) => {
if (anchorRef.current?.contains(event.target as Node)) return;
setOpen(false);
};
const handleConfirmDelete = async () => {
setConfirmOpen(false);
if (onDelete) await onDelete();
};
const id = open ? 'action' : undefined;
return (
<Box>
......@@ -48,13 +56,13 @@ export default function ActionGroup({
<Link href={onView || ""} className='block py-3 px-4 hover:bg-[#FBF4FB]'>View Profile</Link>
</ListItem>
<ListItem>
<Link href={onView || ""} className='block py-3 px-4 hover:bg-[#FBF4FB]'>Edit</Link>
<Link href={onEdit || ""} className='block py-3 px-4 hover:bg-[#FBF4FB]'>Edit</Link>
</ListItem>
<ListItem>
<Link href={"#"} className='block py-3 px-4 hover:bg-[#FBF4FB]'
onClick={(e) => {
e.preventDefault();
onDelete;
setConfirmOpen(true);
}}
>Delete</Link>
</ListItem>
......@@ -64,6 +72,28 @@ export default function ActionGroup({
</Fade>
)}
</Popper>
<Dialog
open={confirmOpen}
onClose={() => setConfirmOpen(false)}
>
<DialogTitle>Confirm Delete</DialogTitle>
<DialogContent>
<p className='text-para-light'>
Are you sure you want to delete this record? This action cannot be undone.
</p>
</DialogContent>
<DialogActions>
<Button color="error"
variant="contained" onClick={() => setConfirmOpen(false)}>Cancel</Button>
<Button
onClick={handleConfirmDelete}
color="success"
variant="contained"
>
Delete
</Button>
</DialogActions>
</Dialog>
</Box>
)
}
import GoldCoinIcon from '@/icons/GoldCoinIcon'
import { Box } from '@mui/material'
import React from 'react'
export default function CoinCard() {
return (
<Box sx={{
background: "linear-gradient(to right,#FFA325,#693C00)",
padding: "1px",
borderRadius: "40px"
}}>
<Box sx={{
background: "#2D2D30",
borderRadius: "40px"
}} className="flex justify-start items-center gap-1 py-2 pl-4 pr-8">
<GoldCoinIcon />
<div className="coins">
<strong className="text-[12px] leading-4 font-[600] text-[#FBA027] block">20,000</strong>
<span className="text-[9px] mt-[-2px] block">Gold Coins</span>
</div>
</Box>
</Box >
)
}
"use client";
import React from "react";
import { Snackbar, Alert, IconButton } from "@mui/material";
import { CloseCircle } from "@wandersonalwes/iconsax-react";
import { closeToast } from "@/slice/toastSlice";
......@@ -12,49 +13,43 @@ export default function Toast() {
);
const dispatch = useAppDispatch();
React.useEffect(() => {
if (isActive && autoTimeout) {
const timeout = setTimeout(() => {
dispatch(closeToast());
}, duration || 3000);
return () => clearTimeout(timeout);
}
}, [isActive, duration, autoTimeout, dispatch]);
if (!isActive) return null;
const variantStyles: Record<string, string> = {
success: "border-green-500 bg-green-50 text-green-800",
error: "border-red-500 bg-red-50 text-red-800",
warning: "border-yellow-500 bg-yellow-50 text-yellow-800",
info: "border-blue-500 bg-blue-50 text-blue-800",
};
const currentVariant = variant?.toLowerCase() || "info";
return (
<div
className={`z-[9999] fixed top-4 right-4 flex max-w-sm w-full items-start gap-3 rounded-xl border-l-4 px-4 py-3 shadow-lg transition-all duration-300 animate-in slide-in-from-right
data-[state=closed]:slide-out-to-right data-[state=closed]:fade-out
${variantStyles[currentVariant]}`}
<Snackbar
open={isActive}
anchorOrigin={{ vertical: "top", horizontal: "right" }}
onClose={() => dispatch(closeToast())}
autoHideDuration={autoTimeout ? duration || 3000 : null}
sx={{ zIndex: 9999 }}
>
<div className="flex flex-1 flex-col">
{variant && (
<h4 className="text-sm font-semibold">
{variant.charAt(0).toUpperCase() + variant.slice(1).toLowerCase()}
</h4>
)}
{message && <p className="text-sm leading-snug">{message}</p>}
</div>
<button
type="button"
onClick={() => dispatch(closeToast())}
className="max-w-fit p-0 text-current transition-opacity hover:opacity-70"
<Alert
severity={currentVariant as "success" | "error" | "warning" | "info"}
variant="filled"
sx={{ width: "100%" }}
action={
<IconButton
size="small"
aria-label="close"
color="inherit"
onClick={() => dispatch(closeToast())}
>
<CloseCircle size="16" />
</IconButton>
}
>
<CloseCircle size="32" color="#FF8A65" />
</button>
</div>
{message}
</Alert>
</Snackbar>
);
}
......@@ -10,6 +10,7 @@ export default function AdminSearchBar() {
<div className="inpute__field relative">
<OutlinedInput
type="search"
placeholder="Search game"
startAdornment={
<InputAdornment position="start">
<IconButton edge="start">
......
import Avatar from '@/components/atom/Avatar';
import { Transitions } from '@/components/molecules/Transition';
import { useAppDispatch } from '@/hooks/hook';
import { useAppDispatch, useAppSelector } from '@/hooks/hook';
import { PATH } from '@/routes/PATH';
import { clearTokens } from '@/slice/authSlice';
import { Box, Button, ButtonBase, ClickAwayListener, Fade, List, ListItem, ListItemText, Paper, Popper, Stack, Typography } from '@mui/material'
......@@ -8,6 +8,7 @@ import { ArrowDown2 } from '@wandersonalwes/iconsax-react';
import Link from 'next/link';
import { useRouter } from 'next/navigation';
import React, { useRef, useState } from 'react'
import UserProfileMenu from './UserProfileMenu';
const avataur1 = '/assets/images/avatar-6.png';
export default function Profile() {
......@@ -18,6 +19,7 @@ export default function Profile() {
};
const dispatch = useAppDispatch();
const router = useRouter();
const user = useAppSelector((state) => state.auth.user);
const handleClose = (event: MouseEvent | TouchEvent) => {
if (anchorRef.current && anchorRef.current.contains(event.target)) {
return;
......@@ -33,16 +35,34 @@ export default function Profile() {
aria-controls={open ? 'profile-grow' : undefined}
aria-haspopup="true"
onClick={handleToggle}
className='!hover:bg-transparent'
sx={{
padding: 0,
'&:hover': {
backgroundColor: 'transparent', // disables hover bg
},
'&:active': {
backgroundColor: 'transparent', // disables click bg
boxShadow: 'none', // disables ripple/box-shadow
},
'&:focus': {
backgroundColor: 'transparent', // disables focus bg
boxShadow: 'none', // disables focus shadow
},
}}
>
<div className='hidden lg:flex items-center gap-1'>
<Avatar alt="profile user" src={avataur1} />
<div>
<strong className='text-[14px] leading-[120%] font-bold text-text-title block mb-1 text-nowrap'>{"Arjun Jhukal"}</strong>
<p className='text-[12px] text-left leading-[120%] font-[500] text-para-light text-nowrap'>
UI/UX Designer
</p>
</div>
<ArrowDown2 size={14} />
{user?.role.toLowerCase() !== "user" ? <>
<div>
<strong className='text-[14px] leading-[120%] font-bold text-text-title block mb-1 text-nowrap'>{user?.name}</strong>
<p className='text-[12px] text-left leading-[120%] font-[500] text-para-light text-nowrap'>
{user?.role || "User"}
</p>
</div>
<ArrowDown2 size={14} />
</> : ""}
</div>
</Button>
<Popper
......@@ -65,21 +85,28 @@ export default function Profile() {
}}
>
<ClickAwayListener onClickAway={handleClose}>
<List>
<ListItem>
<ListItemText>
<Link href={PATH.ADMIN.GAMES.ADD_GAME.ROOT} className='block py-3 px-4 hover:bg-[#FBF4FB]'>Visit Sweepstake</Link>
</ListItemText>
<ListItemText>
<Link href={""} className='block py-3 px-4 hover:bg-[#FBF4FB] text-red-500' onClick={(e) => {
e.preventDefault();
dispatch(clearTokens());
router.replace(PATH.AUTH.LOGIN.ROOT)
}}>Logout</Link>
</ListItemText>
{
user?.role.toLowerCase() !== "user" ? (
<List>
<ListItem>
<ListItemText>
<Link href={PATH.ADMIN.GAMES.ADD_GAME.ROOT} className='block py-3 px-4 hover:bg-[#FBF4FB]'>Visit Sweepstake</Link>
</ListItemText>
<ListItemText>
<Link href={""} className='block py-3 px-4 hover:bg-[#FBF4FB] text-red-500' onClick={(e) => {
e.preventDefault();
dispatch(clearTokens());
router.replace(PATH.AUTH.LOGIN.ROOT)
}}>Logout</Link>
</ListItemText>
</ListItem>
</List>
) : (
<UserProfileMenu />
)
}
</ListItem>
</List>
</ClickAwayListener>
</Paper>
</Fade>
......
import { Box } from '@mui/material'
import React from 'react'
import Profile from '../Profile'
import AdminSearchBar from '../AdminHeader/AdminSearchBar'
import CoinCard from '@/components/molecules/CoinCard'
import GoldCoinIcon from '@/icons/GoldCoinIcon'
import SilverCoinIcon from '@/icons/SilverCoinIcon'
export default function UserHeader() {
return (
<div>UserHeader</div>
<Box className='flex items-center gap-4 justify-between w-full'>
<AdminSearchBar />
<div className="right flex items-center gap-4">
<Box sx={{
background: "linear-gradient(to right,#FFA325,#693C00)",
padding: "1px",
borderRadius: "40px"
}}>
<Box sx={{
background: "#2D2D30",
borderRadius: "40px"
}} className="flex justify-start items-center gap-1 py-2 pl-4 pr-8">
<GoldCoinIcon />
<div className="coins">
<strong className="text-[12px] leading-4 font-[600] text-[#FBA027] block">20,000</strong>
<span className="text-[9px] mt-[-2px] block">Gold Coins</span>
</div>
</Box>
</Box>
<Box sx={{
background: "linear-gradient(to right,#69A29D,#93E0D9)",
padding: "1px",
borderRadius: "40px"
}}>
<Box sx={{
background: "#2D2D30",
borderRadius: "40px"
}} className="flex justify-start items-center gap-1 py-2 pl-4 pr-8">
<SilverCoinIcon />
<div className="coins">
<strong className="text-[12px] leading-4 font-[600] text-[#93E0D8] block">20,000</strong>
<span className="text-[9px] mt-[-2px] block">Gold Coins</span>
</div>
</Box>
</Box >
<Profile />
</div>
</Box>
)
}
import { List, ListItem, ListItemButton, ListItemIcon, ListItemText } from "@mui/material";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useAppDispatch } from "@/hooks/hook";
import { clearTokens } from "@/slice/authSlice";
import { ArrowDown2, ArrowUp2, Coin, Logout, MoneySend, Profile, Wallet2 } from "@wandersonalwes/iconsax-react";
const UserProfileMenu = () => {
const router = useRouter();
const dispatch = useAppDispatch();
const menuItems = [
{
label: "Profile",
href: "/profile",
icon: <Profile size="20" />,
},
{
label: "Game Credentials",
href: "#",
icon: <Wallet2 size="20" />,
onClick: (e: React.MouseEvent) => {
e.preventDefault();
dispatch(clearTokens());
router.replace("/login");
},
textColor: "text-red-500",
},
{
label: "Deposit History",
href: "/deposit-history",
icon: <Coin size="20" />,
},
{
label: "Withdraw History",
href: "/withdraw-history",
icon: <MoneySend size="20" />,
},
{
label: "Logout",
href: "#",
icon: <Logout size="20" />,
onClick: (e: React.MouseEvent) => {
e.preventDefault();
dispatch(clearTokens());
router.replace("/login");
},
},
];
return (
<List>
{menuItems.map((item, idx) => (
<ListItem key={idx} disablePadding>
<ListItemButton
component={item.href ? Link : "button"}
href={item.href || undefined}
onClick={item.onClick}
className={`flex items-center py-3 px-4 hover:bg-[#FBF4FB] ${item.textColor || ""}`}
>
<ListItemIcon className="min-w-[30px] mr-1">{item.icon}</ListItemIcon>
<ListItemText primary={item.label} />
</ListItemButton>
</ListItem>
))}
</List>
);
};
export default UserProfileMenu;
......@@ -9,6 +9,7 @@ import { HambergerMenu } from '@wandersonalwes/iconsax-react';
import AdminHeader from './AdminHeader';
import UserHeader from './UserHeader';
import { OutlinedInput } from '@mui/material';
import { useAppSelector } from '@/hooks/hook';
interface AppBarProps extends MuiAppBarProps {
......@@ -22,7 +23,7 @@ const AppBar = styled(MuiAppBar, {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.leavingScreen,
}),
backgroundColor: theme.palette.common.white,
backgroundColor: theme.palette.background.paper,
boxShadow: "none",
variants: [
{
......@@ -44,7 +45,7 @@ export default function Header({ open, handleDrawerOpen }: {
handleDrawerOpen: () => void;
}) {
const user = { role: "ADMIN" }
const user = useAppSelector((state) => state.auth.user);
return (
<AppBar position="fixed" open={open}>
<Toolbar sx={{ gap: "16px" }}>
......
......@@ -21,7 +21,7 @@ export default function UserMenu({ open }: { open: boolean }) {
<ListItemButton
className={[
open ? "expanded" : "collapsed",
pathname.startsWith(PATH.DASHBOARD.ROOT) ? "active" : ""
pathname === PATH.DASHBOARD.ROOT ? "active" : ""
].join(" ")}
onClick={() => { router.push(PATH.DASHBOARD.ROOT) }}
......@@ -41,12 +41,10 @@ export default function UserMenu({ open }: { open: boolean }) {
className={[
open ? "expanded" : "collapsed",
[
PATH.ADMIN.GAMES.ROOT,
PATH.ADMIN.GAMES.ADD_GAME.ROOT,
"/edit-game"
PATH.USER.GAMES.ROOT,
].some(path => pathname.startsWith(path)) ? "active" : ""
].join(" ")}
onClick={() => { router.push(PATH.ADMIN.GAMES.ROOT) }}
onClick={() => { router.push(PATH.USER.GAMES.ROOT) }}
>
<ListItemIcon className={open ? "expanded" : "collapsed"}>
......@@ -86,7 +84,11 @@ export default function UserMenu({ open }: { open: boolean }) {
<ListItemButton
className={[
open ? "expanded" : "collapsed",
pathname.startsWith(PATH.DASHBOARD.ROOT) ? "active" : ""
[
PATH.ADMIN.GAMES.ROOT,
PATH.ADMIN.GAMES.ADD_GAME.ROOT,
"/edit-game"
].some(path => pathname.startsWith(path)) ? "active" : ""
].join(" ")}
onClick={() => { router.push(PATH.DASHBOARD.ROOT) }}
......
......@@ -50,8 +50,9 @@ const Drawer = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== 'open'
whiteSpace: 'nowrap',
boxSizing: 'border-box',
'& .MuiDrawer-paper': {
backgroundColor: theme.palette.common.white,
backgroundColor: theme.palette.background.paper,
color: theme.palette.text.primary,
padding: 0,
},
variants: [
{
......
......@@ -5,9 +5,15 @@ import { flexRender, Table } from "@tanstack/react-table";
interface CustomTableProps<TData> {
table: Table<TData>;
loading?: boolean;
emptyMessage?: string;
skeletonRows?: number;
}
export default function CustomTable<TData>({ table }: CustomTableProps<TData>) {
export default function CustomTable<TData>({ table, loading = false,
emptyMessage = "No records found", skeletonRows = 5, }: CustomTableProps<TData>) {
const rowCount = table.getRowModel().rows.length;
const columnCount = table.getAllLeafColumns().length;
return (
<table className="min-w-full border-collapse border border-gray-200 text-left">
<thead>
......@@ -16,7 +22,7 @@ export default function CustomTable<TData>({ table }: CustomTableProps<TData>) {
{headerGroup.headers.map((header) => (
<th
key={header.id}
className="text-[12px] font-[600] text-title p-2 py-6 px-6 bg-light-gray"
className="text-[12px] font-[600] text-title p-2 py-4 px-4 bg-light-gray"
>
{flexRender(
header.column.columnDef.header,
......@@ -28,16 +34,41 @@ export default function CustomTable<TData>({ table }: CustomTableProps<TData>) {
))}
</thead>
<tbody>
{table.getRowModel().rows.map((row) => (
<tr key={row.id} className="odd:bg-white even:bg-gray-50">
{row.getVisibleCells().map((cell) => (
<td key={cell.id} className="p-2 py-6 px-6">
{flexRender(cell.column.columnDef.cell, cell.getContext())}
</td>
))}
{loading ? (
Array.from({ length: skeletonRows }).map((_, rowIndex) => (
<tr key={`skeleton-${rowIndex}`} className="animate-pulse">
{Array.from({ length: columnCount }).map((_, colIndex) => (
<td key={`skeleton-cell-${rowIndex}-${colIndex}`} className="p-2 py-4 px-4">
<div className="h-4 w-full rounded bg-gray-200" />
</td>
))}
</tr>
))
) : rowCount === 0 ? (
<tr>
<td
colSpan={columnCount}
className="text-center px-4 py-4 text-gray-500"
>
{emptyMessage}
</td>
</tr>
))}
) : (
table.getRowModel().rows.map((row) => (
<tr key={row.id} className="">
{row.getVisibleCells().map((cell) => (
<td key={cell.id} className="px-4 py-4 ">
{flexRender(
cell.column.columnDef.cell,
cell.getContext()
)}
</td>
))}
</tr>
))
)}
</tbody>
</table>
);
}
......@@ -58,7 +58,7 @@ export default function LoginPage() {
);
dispatch(
setTokens({
accessToken: response.data.access_token,
access_token: response.data.access_token,
// refreshToken: response.data?.refresh,
user: response.data?.user,
}),
......
......@@ -3,7 +3,8 @@
import InputFile from '@/components/atom/InputFile'
import PasswordField from '@/components/molecules/PasswordField'
import { useAppDispatch } from '@/hooks/hook'
import { useCreatePlayerMutation } from '@/services/playerApi'
import { PATH } from '@/routes/PATH'
import { useCreatePlayerMutation, useGetPlayerByIdQuery, useUpdatePlayerByIdMutation } from '@/services/playerApi'
import { showToast, ToastVariant } from '@/slice/toastSlice'
import { initialPlayerValues } from '@/types/player'
import { Button, Input, InputLabel, OutlinedInput } from '@mui/material'
......@@ -12,7 +13,7 @@ import { useRouter } from 'next/navigation'
import React from 'react'
import * as Yup from "yup";
export const PlayerValidationSchema = Yup.object().shape({
export const PlayerValidationSchema = (isEdit: boolean) => Yup.object().shape({
name: Yup.string().required("Username is required"),
email: Yup.string()
.email("Invalid email address")
......@@ -25,34 +26,85 @@ export const PlayerValidationSchema = Yup.object().shape({
phone: Yup.string()
.matches(/^\+?\d{7,15}$/, "Invalid phone number")
.nullable(),
password: Yup.string()
.min(6, "Password must be at least 6 characters")
.required("Password is required"),
password_confirmation: Yup.string()
.oneOf([Yup.ref("password")], "Passwords must match")
.required("Password confirmation is required"),
password: isEdit
? Yup.string().nullable() // not required in edit mode
: Yup.string().min(6, "Password must be at least 6 characters").required("Password is required"),
password_confirmation: Yup.string().when("password", {
is: (val: string) => !!val, // required only if password is filled
then: (schema) => schema.oneOf([Yup.ref("password")], "Passwords must match").required("Password confirmation is required"),
otherwise: (schema) => schema.nullable(),
}),
// profile_image: Yup.mixed().required("Profile is required"),
});
export default function AddPlayerForm({ id }: { id?: string | number }) {
export default function AddPlayerForm({ id }: { id?: string }) {
const dispatch = useAppDispatch();
const router = useRouter();
const [createPlayer, { isLoading }] = useCreatePlayerMutation();
const [updatePlayer, { isLoading: updating }] = useUpdatePlayerByIdMutation();
const { data, isLoading: loadingPlayer } = useGetPlayerByIdQuery(
id ? { id } : ({} as any),
{ skip: !id }
);
const formik = useFormik({
initialValues: initialPlayerValues,
validationSchema: PlayerValidationSchema,
// enableReinitialize,
initialValues: data ? {
name: data?.data.name,
email: data?.data.email,
first_name: data?.data.first_name,
last_name: data?.data.last_name,
wallet_address: data?.data.wallet_address,
address: data?.data.address,
city: data?.data.city,
phone: data?.data.phone,
password: data?.data.password,
password_confirmation: data?.data.password_confirmation,
profile_image: null,
} : initialPlayerValues,
validationSchema: PlayerValidationSchema(!!id),
enableReinitialize: true,
onSubmit: async (values) => {
const formData = new FormData();
formData.append("name", values.name);
formData.append("email", values.email);
formData.append("first_name", values.first_name);
formData.append("last_name", values.last_name);
formData.append("password", values.password);
formData.append("password_confirmation", values.password_confirmation);
if (values.wallet_address) formData.append("wallet_address", values.wallet_address);
if (values.address) formData.append("address", values.address);
if (values.city) formData.append("city", values.city);
if (values.phone) formData.append("phone", values.phone);
if (values.profile_image) {
if (Array.isArray(values.profile_image)) {
values.profile_image.forEach((file) => formData.append("profile_image", file));
} else {
formData.append("profile_image", values.profile_image);
}
}
if (id && data) {
formData.append("profile_image_file", data?.data?.profile_image_file || "");
}
if (id) {
try {
console.log("Editing Player")
const response = await updatePlayer({ id: id, body: formData });
dispatch(
showToast({
message: response?.data?.message || "User Updated Successfully",
variant: ToastVariant.SUCCESS
})
);
router.push("/players");
}
catch (e: any) {
dispatch(
showToast({
message: e.error,
message: e.error || e.data.message,
variant: ToastVariant.ERROR
})
)
......@@ -60,41 +112,13 @@ export default function AddPlayerForm({ id }: { id?: string | number }) {
}
else {
try {
const formData = new FormData();
// Required fields
formData.append("name", values.name);
formData.append("email", values.email);
formData.append("first_name", values.first_name);
formData.append("last_name", values.last_name);
formData.append("password", values.password);
formData.append("password_confirmation", values.password_confirmation);
if (values.wallet_address) formData.append("wallet_address", values.wallet_address);
if (values.address) formData.append("address", values.address);
if (values.city) formData.append("city", values.city);
if (values.phone) formData.append("phone", values.phone);
if (values.profile_image) {
if (Array.isArray(values.profile_image)) {
values.profile_image.forEach((file) => formData.append("profile_image", file));
} else {
formData.append("profile_image", values.profile_image);
}
}
const response = await createPlayer(formData).unwrap();
dispatch(
showToast({
message: response.message,
variant: ToastVariant.SUCCESS
})
);
router.push("/players");
}
catch (e: any) {
......@@ -276,6 +300,7 @@ export default function AddPlayerForm({ id }: { id?: string | number }) {
value={formik.values.profile_image || null}
onChange={(file: File | File[] | null) => formik.setFieldValue("profile_image", file)}
onBlur={() => formik.setFieldTouched("profile_image", true)}
serverFile={data?.data?.profile_image_file}
/>
<span className="error">
{formik.touched.profile_image && formik.errors.profile_image ? formik.errors.profile_image : ""}
......@@ -284,8 +309,11 @@ export default function AddPlayerForm({ id }: { id?: string | number }) {
</div>
</div>
<div className="text-end mt-8 lg:mt-12 max-w-fit ml-auto">
<Button type="submit" variant="contained" color="primary" sx={{ color: "#fff" }} disabled={!formik.dirty || formik.isSubmitting}>
<div className="text-end mt-8 lg:mt-12 max-w-fit ml-auto flex justify-end gap-4">
{id ? <Button color='error' variant='contained' onClick={() => {
router.push(PATH.ADMIN.PLAYERS.ROOT)
}}>Cancel Player Edit</Button> : null}
<Button type="submit" variant="contained" color="primary" sx={{ color: "#fff" }} >
Confirm {id ? "Player Update" : "Player Addition"}
</Button>
</div>
......
......@@ -10,7 +10,7 @@ import { showToast, ToastVariant } from '@/slice/toastSlice';
import { PlayerItem, PlayerProps } from '@/types/player';
import { formatDateTime } from '@/utils/formatDateTime';
import { getInitials } from '@/utils/getInitials';
import { Box } from '@mui/material';
import { Box, Checkbox, Pagination } from '@mui/material';
import { ColumnDef, getCoreRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from '@tanstack/react-table';
import { useRouter } from 'next/navigation';
import React, { useMemo, useState } from 'react'
......@@ -20,36 +20,33 @@ export default function PlayerListing() {
const dispatch = useAppDispatch();
const [search, setSearch] = useState("");
const [sorting, setSorting] = useState<{ id: string; desc: boolean }[]>([]);
const [page, setPage] = useState(1);
const [pageSize, setPageSize] = useState(10);
const { data, isLoading: loadingPlayer } = useGetAllPlayerQuery();
const filteredData = useMemo(() => {
if (!data) return [];
return data?.data?.data.filter((player: PlayerItem) => {
const name = player.name ?? "";
const email = player.email ?? "";
return (
name.toLowerCase().includes(search.toLowerCase()) ||
email.toLowerCase().includes(search.toLowerCase())
);
});
}, [search, data]);
const { data, isLoading: loadingPlayer } = useGetAllPlayerQuery({
page,
per_page: pageSize,
search: search || ""
});
const filteredData = useMemo(() => data?.data?.data || [], [data]);
const [deletePlayer, { isLoading: deletingPlayer }] = useDeletePlayerByIdMutation();
const columns = useMemo<ColumnDef<PlayerItem>[]>(() => [
{
id: 'select',
header: ({ table }) => (
<input
type="checkbox"
<Checkbox
indeterminate={
table.getIsSomePageRowsSelected() &&
!table.getIsAllPageRowsSelected()
}
checked={table.getIsAllPageRowsSelected()}
onChange={table.getToggleAllPageRowsSelectedHandler()}
/>
),
cell: ({ row }) => (
<input
type="checkbox"
<Checkbox
checked={row.getIsSelected()}
onChange={row.getToggleSelectedHandler()}
/>
......@@ -126,11 +123,12 @@ export default function PlayerListing() {
onView={`${PATH.ADMIN.PLAYERS.ROOT}/${row.original.id}`}
onEdit={`${PATH.ADMIN.PLAYERS.EDIT_PLAYER.ROOT}/${row.original.id}`}
onDelete={async () => {
console.log("delete Clicked");
const response = await deletePlayer({ id: row.original.id }).unwrap();
dispatch(
showToast({
message: response.message,
variant: ToastVariant.ERROR
variant: ToastVariant.SUCCESS
})
)
}}
......@@ -150,12 +148,37 @@ export default function PlayerListing() {
return (
<section className="player__listing_root">
<TableHeader
search={search}
setSearch={setSearch}
onDownloadCSV={() => { }}
/>
<CustomTable table={table} />
<div className="border-gray border-solid border-[1px] rounded-[8px] lg:rounded-[16px]">
<TableHeader
search={search}
setSearch={setSearch}
onDownloadCSV={() => { }}
/>
<CustomTable
table={table}
loading={loadingPlayer}
/>
<div className="flex justify-between items-center mt-4 px-8 py-6">
<div>
<span>Row per page:</span>
<select
value={pageSize}
onChange={(e) => setPageSize(Number(e.target.value))}
className="ml-2 border border-gray-300 rounded p-1"
>
{[5, 10, 15, 20].map((size) => (
<option key={size} value={size}>
{size}
</option>
))}
</select>
</div>
<Pagination count={data?.data?.pagination.total_pages || 1}
page={page}
onChange={(_, value) => setPage(value)} variant="outlined" shape="rounded" sx={{ gap: "8px" }} />
</div>
</div>
</section>
)
}
import React from 'react'
export default function PlayerDetailPage() {
return (
<div>PlayerDetailPage</div>
)
}
import React from "react";
import { GameItem } from "@/types/game";
export default function ExlusiveGameDetail({ game }: { game: GameItem }) {
return (
<div className="p-4">
<h1 className="text-2xl font-bold">{game.name}</h1>
<p className="text-gray-600">{game.description}</p>
<p className="text-sm">Provider: {game.provider}</p>
</div>
);
}
import { PATH } from '@/routes/PATH';
import ProtectedLink from '@/routes/ProtectedLink';
import { getAllGames } from '@/serverApi/game';
import { Tooltip } from '@mui/material';
import Image from 'next/image';
import Link from 'next/link';
import React from 'react'
export default async function ExclusiveGamePage() {
const games = await getAllGames();
return (
<section className="exclusive__game__root">
<h2 className='mb-4 text-[20px] leading-[140%]'>Exclusive Games</h2>
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-5 gap-4">
{
games?.data?.data.map((game) => (
<ProtectedLink href={`${PATH.USER.GAMES.ROOT}/${game.id}`} className="group block overflow-hidden hover:shadow-md transition rounded-2xl aspect-[208/222] relative" key={game.id}>
<Tooltip title={game.name}>
<Image
src={game.thumbnail || "/assets/images/fallback.png"}
alt={game.name}
fill
className="w-full h-[222px] object-cover group-hover:scale-105 transition-transform duration-300"
/>
</Tooltip>
</ProtectedLink>
))
}
</div>
</section>
)
}
......@@ -2,6 +2,7 @@ import { authApi } from "@/services/authApi";
import { configureStore } from "@reduxjs/toolkit";
import auth from "@/slice/authSlice";
import toastSlice from "@/slice/toastSlice";
import authModalSlice from "@/slice/authModalSlice";
import { gameApi } from "@/services/gameApi";
import { playerApi } from "@/services/playerApi";
import { providerApi } from "@/services/providerApi";
......@@ -10,6 +11,7 @@ export const store = configureStore({
reducer: {
auth,
toastSlice,
authModalSlice,
[authApi.reducerPath]: authApi.reducer,
[gameApi.reducerPath]: gameApi.reducer,
[providerApi.reducerPath]: providerApi.reducer,
......
import React from 'react'
export default function GoldCoinIcon() {
return (
<svg width="26" height="28" viewBox="0 0 26 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M18.8246 13.6858L18.2487 10.6656C17.8192 8.41283 15.8494 6.7832 13.5561 6.7832H11.3954C9.10207 6.7832 7.13237 8.41283 6.70279 10.6656L6.37627 12.3779C6.06251 14.0234 5.56094 15.6333 4.81084 17.1311C4.59153 17.5691 4.47636 18.0681 4.49793 18.5961C4.56031 20.1237 5.90476 21.4381 7.4333 21.468C7.4445 21.4682 7.45569 21.4684 7.46689 21.4685C8.16038 21.4745 8.82813 21.7447 9.31445 22.2392C9.85803 22.7917 10.6141 23.1345 11.4506 23.1345C12.4657 23.1345 13.3627 22.6298 13.905 21.8578C14.0796 21.6093 14.3659 21.468 14.6696 21.4686H14.6749C14.8053 21.4686 14.9336 21.4589 15.0589 21.4404C15.2952 21.4054 15.5343 21.4657 15.7294 21.6036C16.257 21.9768 16.9104 22.184 17.6137 22.1484C19.1188 22.0722 20.3467 20.8674 20.4489 19.3638C20.4857 18.8227 20.3787 18.31 20.1624 17.8596C19.5277 16.5376 19.0992 15.1262 18.8246 13.6858Z"
fill="url(#paint0_linear_4849_11664)" />
<path
d="M7.49338 21.4687C9.14914 21.4687 10.4914 20.1264 10.4914 18.4707C10.4914 16.8149 9.14914 15.4727 7.49338 15.4727C5.83762 15.4727 4.49536 16.8149 4.49536 18.4707C4.49536 20.1264 5.83762 21.4687 7.49338 21.4687Z"
fill="url(#paint1_linear_4849_11664)" />
<path
d="M11.4504 23.1345C13.1062 23.1345 14.4484 21.7922 14.4484 20.1364C14.4484 18.4807 13.1062 17.1384 11.4504 17.1384C9.79465 17.1384 8.45239 18.4807 8.45239 20.1364C8.45239 21.7922 9.79465 23.1345 11.4504 23.1345Z"
fill="url(#paint2_linear_4849_11664)" />
<path
d="M17.458 22.1525C19.1137 22.1525 20.456 20.8103 20.456 19.1545C20.456 17.4988 19.1137 16.1565 17.458 16.1565C15.8022 16.1565 14.46 17.4988 14.46 19.1545C14.46 20.8103 15.8022 22.1525 17.458 22.1525Z"
fill="url(#paint3_linear_4849_11664)" />
<path
d="M14.2175 10.3125C14.0005 10.2454 13.7942 10.197 13.599 10.1672C13.5047 10.1528 13.4096 10.1411 13.3136 10.1319C13.3129 10.1315 13.3121 10.1311 13.3113 10.1306L12.8718 9.67545C12.785 9.61879 12.6909 9.59033 12.5897 9.59033C12.4738 9.59033 12.3762 9.61733 12.2967 9.67088C12.217 9.72461 12.1773 9.78842 12.1773 9.86199V10.1438C11.5478 10.2323 11.0287 10.4648 10.62 10.8411C10.2111 11.2173 10.0069 11.7337 10.0069 12.3903C10.0069 12.658 10.0538 12.9022 10.1479 13.1228C10.2418 13.3436 10.3504 13.5243 10.4735 13.6654L12.1773 15.3708V16.3839C11.8951 16.3334 11.5875 16.1904 11.2549 15.9552C10.922 15.7202 10.6868 15.6025 10.5494 15.6025C10.3541 15.6025 10.1822 15.7039 10.034 15.9064C9.88566 16.109 9.81152 16.3117 9.81152 16.5141C9.81152 16.778 9.94098 17.0217 10.1995 17.2455L14.448 21.4941C14.5199 21.4772 14.5942 21.4686 14.6697 21.4687H14.6749C14.8054 21.4687 14.9336 21.4591 15.059 21.4405C15.2953 21.4055 15.5344 21.4658 15.7295 21.6038C16.2571 21.977 16.9104 22.1841 17.6137 22.1485C19.1189 22.0724 20.3467 20.8675 20.449 19.3639C20.4857 18.8229 20.3788 18.3101 20.1625 17.8597C19.7207 16.9397 19.379 15.9762 19.1194 14.9899L14.7439 10.6143C14.6099 10.4802 14.4346 10.3797 14.2175 10.3125Z"
fill="url(#paint4_linear_4849_11664)" />
<path
d="M15.0043 14.745C14.9137 14.5135 14.8052 14.3217 14.6788 14.1698C14.5521 14.0178 14.3839 13.8732 14.1741 13.7357C13.9642 13.5983 13.7762 13.4934 13.6098 13.421C13.4433 13.3487 13.2409 13.2655 13.0021 13.1713V11.5869C13.2625 11.6086 13.5138 11.681 13.7563 11.8039C13.9986 11.927 14.1704 11.9884 14.2718 11.9884C14.4815 11.9884 14.6462 11.8855 14.7656 11.6796C14.8849 11.4738 14.9447 11.275 14.9447 11.0838C14.9447 10.9049 14.8777 10.7484 14.7439 10.6141C14.6099 10.4799 14.4346 10.3794 14.2176 10.3123C14.0005 10.2451 13.7943 10.1967 13.599 10.167C13.4037 10.1371 13.2045 10.1184 13.0022 10.111V9.86054C13.0022 9.79373 12.9587 9.73203 12.8719 9.6752C12.7851 9.61855 12.6909 9.59009 12.5897 9.59009C12.4739 9.59009 12.3762 9.61704 12.2967 9.67064C12.217 9.72437 12.1773 9.78813 12.1773 9.86175V10.1436C11.5479 10.2321 11.0287 10.4646 10.6201 10.8409C10.2112 11.2171 10.0069 11.7334 10.0069 12.39C10.0069 12.6578 10.0539 12.902 10.1479 13.1226C10.2418 13.3433 10.3504 13.5241 10.4735 13.6652C10.5965 13.8062 10.7701 13.9437 10.9944 14.0776C11.2186 14.2115 11.4068 14.3109 11.5587 14.376C11.7107 14.4411 11.9168 14.5244 12.1773 14.6256V16.3837C11.8951 16.3332 11.5875 16.1902 11.2549 15.955C10.922 15.72 10.6868 15.6023 10.5494 15.6023C10.3541 15.6023 10.1822 15.7037 10.034 15.9062C9.88566 16.1088 9.81152 16.3115 9.81152 16.5139C9.81152 16.8685 10.0448 17.1867 10.5115 17.4689C10.9782 17.7511 11.5333 17.903 12.1773 17.9247V18.196C12.1773 18.2755 12.217 18.3442 12.2967 18.4022C12.3762 18.46 12.4739 18.489 12.5897 18.489C12.6909 18.489 12.7851 18.4582 12.8719 18.3967C12.9587 18.3352 13.0022 18.2682 13.0022 18.196V17.8813C13.6533 17.7728 14.1723 17.516 14.5594 17.1107C14.9464 16.7057 15.14 16.1739 15.14 15.5155C15.1399 15.2333 15.0947 14.9766 15.0043 14.745ZM12.2858 12.9109C11.8228 12.7156 11.5913 12.4877 11.5913 12.2272C11.5913 11.9163 11.8228 11.7136 12.2858 11.6195V12.9109ZM12.8935 16.3728V14.9186C13.3347 15.1285 13.5555 15.3852 13.5555 15.6891C13.5555 16.0436 13.3347 16.2716 12.8935 16.3728Z"
fill="url(#paint5_linear_4849_11664)" />
<path
d="M13.9484 6.7832H11.0034L9.66355 4.21468C9.46577 3.83551 9.69158 3.37317 10.1122 3.29602L10.9896 3.13513C11.9723 2.95496 12.9794 2.95496 13.9621 3.13513L14.8395 3.29602C15.2601 3.37313 15.486 3.83547 15.2881 4.21468L13.9484 6.7832Z"
fill="url(#paint6_linear_4849_11664)" />
<path
d="M12.9658 6.7832H11.9863L11.5407 4.21468C11.4749 3.83551 11.5501 3.37317 11.6899 3.29602L11.9817 3.13513C12.3086 2.95496 12.6435 2.95496 12.9703 3.13513L13.2621 3.29602C13.402 3.37313 13.4771 3.83547 13.4113 4.21468L12.9658 6.7832Z"
fill="url(#paint7_linear_4849_11664)" />
<path
d="M15.244 3.5544C15.3015 3.63607 15.2725 3.7499 15.1835 3.79502C14.7657 4.00753 14.2716 4.00753 13.8537 3.79502L13.4844 3.60744C13.0665 3.39493 12.5724 3.39493 12.1546 3.60744L11.7857 3.79502C11.3678 4.00753 10.8737 4.00753 10.4559 3.79502L10.0695 3.59849C9.93414 3.52964 9.95933 3.32489 10.1086 3.29682C10.1098 3.29656 10.1111 3.29634 10.1124 3.29613L10.9898 3.13494C11.9723 2.95502 12.9796 2.95502 13.9621 3.13494L14.8395 3.29613C15.0128 3.32777 15.1528 3.42468 15.244 3.5544Z"
fill="url(#paint8_linear_4849_11664)" />
<path
d="M12.4759 7.07112C11.8375 7.07112 11.2333 7.02987 10.7381 6.95367C10.575 6.92857 10.4656 6.77311 10.4985 6.6114C10.5291 6.46106 10.6719 6.36096 10.8236 6.38421C11.2887 6.45551 11.8738 6.49542 12.4759 6.49542C13.078 6.49542 13.6631 6.45551 14.1282 6.38421C14.2798 6.36096 14.4226 6.46102 14.4533 6.6114C14.4861 6.77311 14.3768 6.92857 14.2137 6.95367C13.7185 7.02987 13.1143 7.07112 12.4759 7.07112Z"
fill="url(#paint9_linear_4849_11664)" />
<path
d="M8.36445 25.0002H3.29151C3.10419 25.0002 2.96543 24.8261 3.00723 24.6435L3.42954 22.7972C3.48572 22.5516 3.70417 22.3774 3.95611 22.3774H7.69993C7.95188 22.3774 8.17033 22.5516 8.22651 22.7972L8.64881 24.6435C8.69053 24.8261 8.55177 25.0002 8.36445 25.0002Z"
fill="url(#paint10_linear_4849_11664)" />
<path
d="M12.0404 20.7858C12.0996 20.7185 12.1282 20.6247 12.1062 20.5282L11.6839 18.6819C11.6277 18.4364 11.4093 18.2622 11.1573 18.2622H7.41349C7.20154 18.2622 7.01366 18.3857 6.92579 18.5711L3.52407 22.5934C3.47968 22.6525 3.44687 22.7214 3.42952 22.7971L3.00722 24.6434C2.96546 24.826 3.10422 25.0001 3.2915 25.0001H8.36448C8.49282 25.0001 8.5983 24.9183 8.6386 24.8082L12.0404 20.7858Z"
fill="url(#paint11_linear_4849_11664)" />
<path
d="M11.6839 18.682C11.6817 18.6724 11.6789 18.6632 11.6762 18.6539C11.6125 18.6277 11.5433 18.613 11.4712 18.613H7.72737C7.51542 18.613 7.32754 18.7366 7.23967 18.9219L3.83791 22.9443C3.79352 23.0034 3.76071 23.0723 3.74336 23.1479L3.32106 24.9943C3.32063 24.9962 3.32046 24.9982 3.32007 25.0002H8.36451C8.49285 25.0002 8.59833 24.9184 8.63862 24.8083L12.0403 20.7859C12.0996 20.7187 12.1282 20.6248 12.1062 20.5284L11.6839 18.682Z"
fill="url(#paint12_linear_4849_11664)" />
<path
d="M8.36445 25.0002H3.29151C3.10419 25.0002 2.96543 24.8261 3.00723 24.6435L3.42954 22.7972C3.48572 22.5516 3.70417 22.3774 3.95611 22.3774H7.69993C7.95188 22.3774 8.17033 22.5516 8.22651 22.7972L8.64881 24.6435C8.69053 24.8261 8.55177 25.0002 8.36445 25.0002Z"
fill="url(#paint13_linear_4849_11664)" />
<path
d="M8.22672 22.797C8.22035 22.7691 8.21161 22.7423 8.20124 22.7164C8.1386 22.6912 8.07066 22.677 7.99988 22.677H4.25606C4.00412 22.677 3.78567 22.8511 3.72949 23.0967L3.30718 24.943C3.30279 24.9622 3.30085 24.9812 3.30029 25H8.36471C8.55203 25 8.69079 24.8259 8.64903 24.6433L8.22672 22.797Z"
fill="url(#paint14_linear_4849_11664)" />
<path
d="M14.4128 25.0002H9.33988C9.15256 25.0002 9.0138 24.8261 9.05556 24.6435L9.47786 22.7972C9.53405 22.5516 9.7525 22.3774 10.0044 22.3774H13.7483C14.0002 22.3774 14.2187 22.5516 14.2748 22.7972L14.6971 24.6435C14.7389 24.8261 14.6001 25.0002 14.4128 25.0002Z"
fill="url(#paint15_linear_4849_11664)" />
<path
d="M18.0887 20.7858C18.1479 20.7185 18.1766 20.6247 18.1545 20.5282L17.7322 18.6819C17.676 18.4364 17.4576 18.2622 17.2056 18.2622H13.4618C13.2499 18.2622 13.062 18.3857 12.9741 18.5711L9.57241 22.5934C9.52802 22.6525 9.49521 22.7214 9.47786 22.7971L9.05556 24.6434C9.0138 24.826 9.15256 25.0001 9.33988 25.0001H14.4128C14.5412 25.0001 14.6466 24.9183 14.6869 24.8082L18.0887 20.7858Z"
fill="url(#paint16_linear_4849_11664)" />
<path
d="M17.7322 18.6818C17.73 18.6722 17.7272 18.663 17.7245 18.6537C17.6608 18.6275 17.5916 18.6128 17.5194 18.6128H13.7756C13.5637 18.6128 13.3758 18.7363 13.288 18.9217L9.8862 22.9441C9.84182 23.0032 9.80901 23.072 9.7917 23.1477L9.3694 24.994C9.36892 24.996 9.3688 24.998 9.36841 25H14.4128C14.5412 25 14.6467 24.9182 14.687 24.808L18.0887 20.7857C18.1479 20.7184 18.1766 20.6246 18.1545 20.5282L17.7322 18.6818Z"
fill="url(#paint17_linear_4849_11664)" />
<path
d="M14.4128 25.0002H9.33988C9.15256 25.0002 9.0138 24.8261 9.05556 24.6435L9.47786 22.7972C9.53405 22.5516 9.7525 22.3774 10.0044 22.3774H13.7483C14.0002 22.3774 14.2187 22.5516 14.2748 22.7972L14.6971 24.6435C14.7389 24.8261 14.6001 25.0002 14.4128 25.0002Z"
fill="url(#paint18_linear_4849_11664)" />
<path
d="M14.2746 22.797C14.2682 22.7691 14.2595 22.7423 14.2491 22.7164C14.1865 22.6912 14.1186 22.677 14.0478 22.677H10.304C10.052 22.677 9.83356 22.8511 9.77738 23.0967L9.35508 24.943C9.35069 24.9622 9.3487 24.9812 9.34814 25H14.4126C14.5999 25 14.7386 24.8259 14.6968 24.6433L14.2746 22.797Z"
fill="url(#paint19_linear_4849_11664)" />
<path
d="M17.7322 18.6819C17.7036 18.5568 17.6327 18.4504 17.5369 18.376L9.64667 22.5056L9.57236 22.5935C9.52798 22.6526 9.49517 22.7214 9.47786 22.7971L9.05556 24.6434C9.0138 24.826 9.15256 25.0001 9.33988 25.0001H14.4128C14.5412 25.0001 14.6466 24.9183 14.6869 24.8081L18.0887 20.7858C18.1479 20.7185 18.1765 20.6247 18.1545 20.5283L17.7322 18.6819Z"
fill="url(#paint20_linear_4849_11664)" />
<path
d="M20.0364 25.0002H14.9634C14.7761 25.0002 14.6373 24.8261 14.6791 24.6435L15.1014 22.7972C15.1576 22.5516 15.376 22.3774 15.628 22.3774H19.3718C19.6237 22.3774 19.8422 22.5516 19.8984 22.7972L20.3207 24.6435C20.3624 24.8261 20.2237 25.0002 20.0364 25.0002Z"
fill="url(#paint21_linear_4849_11664)" />
<path
d="M23.7122 20.7858C23.7715 20.7185 23.8001 20.6247 23.7781 20.5282L23.3558 18.6819C23.2996 18.4364 23.0811 18.2622 22.8292 18.2622H19.0854C18.8734 18.2622 18.6855 18.3857 18.5977 18.5711L15.1959 22.5934C15.1516 22.6525 15.1187 22.7214 15.1014 22.7971L14.6791 24.6434C14.6373 24.826 14.7761 25.0001 14.9634 25.0001H20.0364C20.1647 25.0001 20.2702 24.9183 20.3105 24.8082L23.7122 20.7858Z"
fill="url(#paint22_linear_4849_11664)" />
<path
d="M23.3555 18.6818C23.3533 18.6722 23.3505 18.663 23.3478 18.6537C23.2842 18.6275 23.2149 18.6128 23.1427 18.6128H19.3989C19.187 18.6128 18.9991 18.7363 18.9113 18.9217L15.5095 22.9441C15.4651 23.0032 15.4323 23.072 15.415 23.1477L14.9927 24.994C14.9922 24.996 14.9921 24.998 14.9917 25H20.0361C20.1645 25 20.27 24.9182 20.3103 24.808L23.712 20.7857C23.7713 20.7184 23.7999 20.6246 23.7778 20.5282L23.3555 18.6818Z"
fill="url(#paint23_linear_4849_11664)" />
<path
d="M20.0364 25.0002H14.9634C14.7761 25.0002 14.6373 24.8261 14.6791 24.6435L15.1014 22.7972C15.1576 22.5516 15.376 22.3774 15.628 22.3774H19.3718C19.6237 22.3774 19.8422 22.5516 19.8984 22.7972L20.3207 24.6435C20.3624 24.8261 20.2237 25.0002 20.0364 25.0002Z"
fill="url(#paint24_linear_4849_11664)" />
<path
d="M19.8984 22.797C19.892 22.7691 19.8832 22.7423 19.8729 22.7164C19.8102 22.6912 19.7423 22.677 19.6715 22.677H15.9277C15.6757 22.677 15.4573 22.8511 15.4011 23.0967L14.9788 24.943C14.9744 24.9622 14.9725 24.9812 14.9719 25H20.0363C20.2237 25 20.3624 24.8259 20.3206 24.6433L19.8984 22.797Z"
fill="url(#paint25_linear_4849_11664)" />
<path
d="M20.9113 18.2641L20.9124 18.2622H19.0851C18.8731 18.2622 18.6853 18.3857 18.5974 18.5711L17.8963 19.4001L17.7321 18.6819C17.6759 18.4364 17.4574 18.2622 17.2055 18.2622H13.9438L12.3585 20.1367C12.3141 20.1958 12.2813 20.2647 12.264 20.3404L11.8417 22.1867C11.8127 22.3135 11.8709 22.4361 11.9718 22.4992L14.4674 24.9948C14.5704 24.9753 14.6524 24.9022 14.6868 24.8081L14.6883 24.8063C14.7281 24.9174 14.8341 25 14.9631 25H20.036C20.1644 25 20.2699 24.9183 20.3102 24.8081L23.584 20.9369L20.9113 18.2641Z"
fill="url(#paint26_linear_4849_11664)" />
<path
d="M17.199 22.5433H12.126C11.9387 22.5433 11.7999 22.3693 11.8417 22.1867L12.264 20.3404C12.3202 20.0948 12.5386 19.9207 12.7906 19.9207H16.5344C16.7863 19.9207 17.0048 20.0948 17.061 20.3404L17.4833 22.1867C17.525 22.3693 17.3863 22.5433 17.199 22.5433Z"
fill="url(#paint27_linear_4849_11664)" />
<path
d="M20.8749 18.329C20.9341 18.2617 20.9627 18.1679 20.9407 18.0715L20.5184 16.2251C20.4622 15.9796 20.2438 15.8054 19.9918 15.8054H16.248C16.0361 15.8054 15.8482 15.9289 15.7603 16.1143L12.3585 20.1367C12.3142 20.1958 12.2813 20.2646 12.264 20.3403L11.8417 22.1866C11.7999 22.3692 11.9387 22.5433 12.126 22.5433H17.199C17.3273 22.5433 17.4328 22.4616 17.4731 22.3514L20.8749 18.329Z"
fill="url(#paint28_linear_4849_11664)" />
<path
d="M20.5184 16.2252C20.5162 16.2157 20.5133 16.2064 20.5107 16.1971C20.447 16.1709 20.3778 16.1562 20.3056 16.1562H16.5618C16.3499 16.1562 16.162 16.2798 16.0741 16.4652L12.6723 20.4875C12.6279 20.5466 12.5951 20.6155 12.5778 20.6912L12.1555 22.5375C12.1551 22.5395 12.1549 22.5414 12.1545 22.5434H17.199C17.3273 22.5434 17.4328 22.4617 17.4731 22.3515L20.8749 18.3292C20.9341 18.2619 20.9627 18.1681 20.9407 18.0716L20.5184 16.2252Z"
fill="url(#paint29_linear_4849_11664)" />
<path
d="M17.199 22.5433H12.126C11.9387 22.5433 11.7999 22.3693 11.8417 22.1867L12.264 20.3404C12.3202 20.0948 12.5386 19.9207 12.7906 19.9207H16.5344C16.7863 19.9207 17.0048 20.0948 17.061 20.3404L17.4833 22.1867C17.525 22.3693 17.3863 22.5433 17.199 22.5433Z"
fill="url(#paint30_linear_4849_11664)" />
<path
d="M17.0612 20.3404C17.0548 20.3125 17.0461 20.2857 17.0357 20.2599C16.9731 20.2346 16.9051 20.2205 16.8344 20.2205H13.0905C12.8386 20.2205 12.6201 20.3946 12.564 20.6402L12.1417 22.4865C12.1373 22.5057 12.1353 22.5246 12.1348 22.5434H17.1992C17.3865 22.5434 17.5253 22.3693 17.4835 22.1868L17.0612 20.3404Z"
fill="url(#paint31_linear_4849_11664)" />
<path
d="M15.5268 5.98997L14.791 6.72579C14.6611 6.85568 14.4505 6.85568 14.3206 6.72579C14.1907 6.5959 14.1907 6.38528 14.3206 6.25539L15.0564 5.51954C15.1863 5.38965 15.3969 5.38965 15.5268 5.51954C15.6567 5.64943 15.6567 5.86004 15.5268 5.98997Z"
fill="url(#paint32_linear_4849_11664)" />
<path
d="M15.0876 5.66884C15.1662 5.74746 15.2223 5.83998 15.256 5.93848C15.3066 6.0862 15.2668 6.24993 15.1564 6.36036L14.7971 6.71967C14.6653 6.85146 14.4454 6.85555 14.3161 6.72131C14.1907 6.59112 14.1922 6.38386 14.3205 6.25548L14.9891 5.58691C15.0239 5.61064 15.0568 5.6381 15.0876 5.66884Z"
fill="url(#paint33_linear_4849_11664)" />
<path
d="M14.7184 6.03803C14.8134 6.133 14.8756 6.24834 14.905 6.36992C14.9343 6.49103 14.8981 6.61868 14.81 6.70676L14.7971 6.71968C14.6653 6.85146 14.4454 6.85555 14.3161 6.72132C14.1907 6.59112 14.1922 6.38387 14.3205 6.25549L14.62 5.95605C14.6547 5.97982 14.6877 6.00729 14.7184 6.03803Z"
fill="url(#paint34_linear_4849_11664)" />
<path
d="M15.1883 5.53362L14.4524 6.26948C14.3225 6.39937 14.3225 6.60998 14.4524 6.73987C14.4915 6.77901 14.5381 6.80613 14.5875 6.82172C14.6617 6.81465 14.7341 6.78267 14.791 6.72579L15.5268 5.98998C15.6567 5.86009 15.6567 5.64948 15.5268 5.51959C15.4877 5.48045 15.4411 5.45333 15.3918 5.43774C15.3175 5.44476 15.2451 5.47671 15.1883 5.53362Z"
fill="url(#paint35_linear_4849_11664)" />
<path
d="M15.0589 7.47237L14.323 6.73651C14.1931 6.60662 14.1931 6.39601 14.323 6.26612C14.4529 6.13623 14.6635 6.13623 14.7934 6.26612L15.5293 7.00193C15.6591 7.13182 15.6591 7.34244 15.5293 7.47233C15.3994 7.60226 15.1888 7.60226 15.0589 7.47237Z"
fill="url(#paint36_linear_4849_11664)" />
<path
d="M15.3802 7.03313C15.3016 7.11175 15.209 7.16789 15.1105 7.2016C14.9628 7.25214 14.7991 7.21232 14.6887 7.10193L14.3293 6.74261C14.1976 6.61083 14.1935 6.391 14.3277 6.26167C14.4579 6.13626 14.6652 6.13772 14.7935 6.2661L15.4621 6.93467C15.4384 6.96941 15.411 7.00235 15.3802 7.03313Z"
fill="url(#paint37_linear_4849_11664)" />
<path
d="M15.011 6.66395C14.916 6.75893 14.8007 6.82114 14.6791 6.85059C14.558 6.87991 14.4304 6.84366 14.3423 6.75553L14.3293 6.74261C14.1976 6.61083 14.1935 6.391 14.3277 6.26167C14.4579 6.13626 14.6652 6.13772 14.7935 6.2661L15.093 6.56554C15.0693 6.60024 15.0418 6.63321 15.011 6.66395Z"
fill="url(#paint38_linear_4849_11664)" />
<path
d="M15.5149 7.13381L14.779 6.39795C14.6492 6.26806 14.4385 6.26806 14.3086 6.39795C14.2695 6.43709 14.2424 6.48363 14.2268 6.53301C14.2339 6.60728 14.2659 6.67965 14.3227 6.73652L15.0586 7.47238C15.1885 7.60227 15.3991 7.60227 15.529 7.47238C15.5681 7.43324 15.5952 7.3867 15.6108 7.33732C15.6038 7.26306 15.5718 7.19068 15.5149 7.13381Z"
fill="url(#paint39_linear_4849_11664)" />
<path
d="M14.3449 7.20185C14.6653 7.20185 14.925 6.94215 14.925 6.6218C14.925 6.30144 14.6653 6.04175 14.3449 6.04175C14.0246 6.04175 13.7649 6.30144 13.7649 6.6218C13.7649 6.94215 14.0246 7.20185 14.3449 7.20185Z"
fill="url(#paint40_radial_4849_11664)" />
<path
d="M14.3449 7.13951C14.6308 7.13951 14.8627 6.9077 14.8627 6.62176C14.8627 6.33581 14.6308 6.104 14.3449 6.104C14.059 6.104 13.8271 6.33581 13.8271 6.62176C13.8271 6.9077 14.059 7.13951 14.3449 7.13951Z"
fill="url(#paint41_linear_4849_11664)" />
<path
d="M14.604 6.10303C14.6432 6.18108 14.6652 6.26921 14.6652 6.36251C14.6652 6.68286 14.4055 6.94255 14.0852 6.94255C13.9919 6.94255 13.9038 6.92051 13.8257 6.88138C13.9209 7.07145 14.1175 7.20195 14.3446 7.20195C14.6649 7.20195 14.9246 6.94225 14.9246 6.6219C14.9246 6.3948 14.7941 6.19826 14.604 6.10303Z"
fill="url(#paint42_linear_4849_11664)" />
<path
d="M14.7371 6.37351C14.7371 6.52235 14.5614 6.64302 14.3448 6.64302C14.1282 6.64302 13.9526 6.52235 13.9526 6.37351C13.9526 6.22468 14.1282 6.104 14.3448 6.104C14.5614 6.10396 14.7371 6.22464 14.7371 6.37351Z"
fill="url(#paint43_linear_4849_11664)" />
<path
d="M21.4728 11.7609C20.9215 12.1202 20.451 12.5934 20.0948 13.1471C20.0147 13.2716 19.8298 13.2712 19.7502 13.1464C19.396 12.5915 18.9273 12.1165 18.3773 11.7552C18.2552 11.675 18.2555 11.4927 18.3779 11.4129C18.9292 11.0537 19.3996 10.5804 19.7558 10.0268C19.836 9.90226 20.0208 9.90261 20.1005 10.0274C20.4547 10.5823 20.9234 11.0572 21.4734 11.4185C21.5955 11.4988 21.5951 11.6812 21.4728 11.7609Z"
fill="url(#paint44_linear_4849_11664)" />
<path
d="M5.4015 12.3585C4.85017 12.7179 4.37973 13.1911 4.02351 13.7447C3.94339 13.8692 3.75852 13.8689 3.67888 13.7441C3.32468 13.1892 2.85597 12.7142 2.30597 12.3529C2.18387 12.2727 2.18422 12.0904 2.30657 12.0106C2.8579 11.6513 3.32834 11.178 3.68456 10.6244C3.76468 10.4999 3.94955 10.5003 4.0292 10.625C4.38343 11.1799 4.8521 11.6549 5.40214 12.0162C5.5242 12.0964 5.5239 12.2788 5.4015 12.3585Z"
fill="url(#paint45_linear_4849_11664)" />
<path
d="M18.8054 9.09098C18.4155 9.34508 18.0829 9.67972 17.831 10.0712C17.7743 10.1592 17.6436 10.159 17.5872 10.0708C17.3368 9.67835 17.0053 9.34249 16.6164 9.08698C16.53 9.03027 16.5303 8.90129 16.6168 8.84493C17.0067 8.59084 17.3393 8.25619 17.5912 7.86471C17.6479 7.77667 17.7787 7.77693 17.835 7.86514C18.0855 8.25757 18.4169 8.59342 18.8059 8.84894C18.8922 8.90564 18.892 9.03458 18.8054 9.09098Z"
fill="url(#paint46_linear_4849_11664)" />
<path
d="M22.9351 7.17594C22.5452 7.43004 22.2125 7.76469 21.9606 8.15616C21.9039 8.24421 21.7732 8.24395 21.7169 8.15573C21.4664 7.76331 21.135 7.42745 20.746 7.17194C20.6597 7.11524 20.6599 6.98625 20.7464 6.92989C21.1363 6.67584 21.469 6.34115 21.7209 5.94967C21.7775 5.86163 21.9083 5.86189 21.9646 5.9501C22.2151 6.34253 22.5466 6.67838 22.9355 6.9339C23.0219 6.9906 23.0216 7.11954 22.9351 7.17594Z"
fill="url(#paint47_linear_4849_11664)" />
<path
d="M6.93213 7.53356C6.54224 7.78766 6.20958 8.12231 5.95768 8.51383C5.90102 8.60187 5.77027 8.60161 5.71395 8.5134C5.46347 8.12097 5.13205 7.78512 4.74307 7.5296C4.65675 7.4729 4.65697 7.34396 4.7435 7.28756C5.13339 7.03346 5.46606 6.69881 5.71796 6.30734C5.77462 6.21929 5.90537 6.21955 5.96168 6.30777C6.21216 6.70019 6.54362 7.03605 6.93256 7.29156C7.01892 7.34822 7.01867 7.47716 6.93213 7.53356Z"
fill="url(#paint48_linear_4849_11664)" />
<defs>
<linearGradient id="paint0_linear_4849_11664" x1="4.49535" y1="14.9588" x2="20.4561"
y2="14.9588" gradientUnits="userSpaceOnUse">
<stop stopColor="#FCB37E" />
<stop offset="0.1704" stopColor="#F0AA76" />
<stop offset="0.4808" stopColor="#CF9362" />
<stop offset="0.8934" stopColor="#9B6D42" />
<stop offset="1" stopColor="#8C6239" />
</linearGradient>
<linearGradient id="paint1_linear_4849_11664" x1="7.5245" y1="17.5" x2="7.09282"
y2="30.9554" gradientUnits="userSpaceOnUse">
<stop stopColor="#8C6239" stopOpacity="0" />
<stop offset="1" stopColor="#8C6239" />
</linearGradient>
<linearGradient id="paint2_linear_4849_11664" x1="11.4542" y1="20.1509" x2="13.3731"
y2="27.4746" gradientUnits="userSpaceOnUse">
<stop stopColor="#8C6239" stopOpacity="0" />
<stop offset="1" stopColor="#8C6239" />
</linearGradient>
<linearGradient id="paint3_linear_4849_11664" x1="17.3915" y1="20.0073" x2="16.6879"
y2="29.0259" gradientUnits="userSpaceOnUse">
<stop stopColor="#005A01" stopOpacity="0" />
<stop offset="1" stopColor="#005A01" />
</linearGradient>
<linearGradient id="paint4_linear_4849_11664" x1="17.8306" y1="17.862" x2="6.40227"
y2="11.3956" gradientUnits="userSpaceOnUse">
<stop stopColor="#8C6239" stopOpacity="0" />
<stop offset="1" stopColor="#8C6239" />
</linearGradient>
<linearGradient id="paint5_linear_4849_11664" x1="11.1661" y1="12.8025" x2="17.426"
y2="18.199" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFC738" />
<stop offset="0.1876" stopColor="#FDBF3C" />
<stop offset="0.4837" stopColor="#F7A848" />
<stop offset="0.8493" stopColor="#ED835B" />
<stop offset="1" stopColor="#E97264" />
</linearGradient>
<linearGradient id="paint6_linear_4849_11664" x1="11.7535" y1="2.39419" x2="13.8643"
y2="6.85557" gradientUnits="userSpaceOnUse">
<stop stopColor="#FCB37E" />
<stop offset="0.1704" stopColor="#F0AA76" />
<stop offset="0.4808" stopColor="#CF9362" />
<stop offset="0.8934" stopColor="#9B6D42" />
<stop offset="1" stopColor="#8C6239" />
</linearGradient>
<linearGradient id="paint7_linear_4849_11664" x1="12.447" y1="4.74918" x2="15.2933"
y2="9.16259" gradientUnits="userSpaceOnUse">
<stop stopColor="#8C6239" stopOpacity="0" />
<stop offset="1" stopColor="#8C6239" />
</linearGradient>
<linearGradient id="paint8_linear_4849_11664" x1="12.5864" y1="3.14889" x2="12.7304"
y2="4.56407" gradientUnits="userSpaceOnUse">
<stop stopColor="#8C6239" stopOpacity="0" />
<stop offset="1" stopColor="#8C6239" />
</linearGradient>
<linearGradient id="paint9_linear_4849_11664" x1="12.4759" y1="6.49959" x2="12.4759"
y2="7.17802" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFC738" />
<stop offset="0.1876" stopColor="#FDBF3C" />
<stop offset="0.4837" stopColor="#F7A848" />
<stop offset="0.8493" stopColor="#ED835B" />
<stop offset="1" stopColor="#E97264" />
</linearGradient>
<linearGradient id="paint10_linear_4849_11664" x1="2.99974" y1="23.6888" x2="8.65622"
y2="23.6888" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint11_linear_4849_11664" x1="7.29875" y1="21.6558" x2="8.95219"
y2="22.9785" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint12_linear_4849_11664" x1="7.78244" y1="22.2327" x2="6.00376"
y2="19.6949" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" stopOpacity="0" />
<stop offset="1" stopColor="#FBED21" />
</linearGradient>
<linearGradient id="paint13_linear_4849_11664" x1="4.46181" y1="22.8611" x2="8.28829"
y2="25.8045" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint14_linear_4849_11664" x1="6.13738" y1="24.5694" x2="4.71091"
y2="21.9453" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" stopOpacity="0" />
<stop offset="1" stopColor="#FBED21" />
</linearGradient>
<linearGradient id="paint15_linear_4849_11664" x1="9.04811" y1="23.6888" x2="14.7046"
y2="23.6888" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint16_linear_4849_11664" x1="13.3471" y1="21.6558" x2="15.0005"
y2="22.9785" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint17_linear_4849_11664" x1="13.8307" y1="22.2325" x2="12.0521"
y2="19.6946" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" stopOpacity="0" />
<stop offset="1" stopColor="#FBED21" />
</linearGradient>
<linearGradient id="paint18_linear_4849_11664" x1="10.5102" y1="22.8611" x2="14.3367"
y2="25.8045" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint19_linear_4849_11664" x1="12.1853" y1="24.5694" x2="10.7588"
y2="21.9453" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" stopOpacity="0" />
<stop offset="1" stopColor="#FBED21" />
</linearGradient>
<linearGradient id="paint20_linear_4849_11664" x1="13.6206" y1="21.5883" x2="13.7396"
y2="13.497" gradientUnits="userSpaceOnUse">
<stop stopColor="white" stopOpacity="0" />
<stop offset="1" stopColor="white" />
</linearGradient>
<linearGradient id="paint21_linear_4849_11664" x1="14.6716" y1="23.6888" x2="20.3281"
y2="23.6888" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint22_linear_4849_11664" x1="18.9706" y1="21.6558" x2="20.6241"
y2="22.9785" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint23_linear_4849_11664" x1="19.454" y1="22.2325" x2="17.6753"
y2="19.6946" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" stopOpacity="0" />
<stop offset="1" stopColor="#FBED21" />
</linearGradient>
<linearGradient id="paint24_linear_4849_11664" x1="16.1337" y1="22.8611" x2="19.9602"
y2="25.8045" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint25_linear_4849_11664" x1="17.809" y1="24.5694" x2="16.3825"
y2="21.9453" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" stopOpacity="0" />
<stop offset="1" stopColor="#FBED21" />
</linearGradient>
<linearGradient id="paint26_linear_4849_11664" x1="18.4696" y1="23.6258" x2="16.0023"
y2="17.1211" gradientUnits="userSpaceOnUse">
<stop stopColor="#E87264" stopOpacity="0" />
<stop offset="1" stopColor="#FF7044" />
</linearGradient>
<linearGradient id="paint27_linear_4849_11664" x1="11.8343" y1="21.232" x2="17.4908"
y2="21.232" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint28_linear_4849_11664" x1="16.1333" y1="19.199" x2="17.7867"
y2="20.5218" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint29_linear_4849_11664" x1="16.617" y1="19.7759" x2="14.8383"
y2="17.2381" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" stopOpacity="0" />
<stop offset="1" stopColor="#FBED21" />
</linearGradient>
<linearGradient id="paint30_linear_4849_11664" x1="13.2963" y1="20.4042" x2="17.1228"
y2="23.3476" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint31_linear_4849_11664" x1="14.9719" y1="22.1129" x2="13.5454"
y2="19.4887" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" stopOpacity="0" />
<stop offset="1" stopColor="#FBED21" />
</linearGradient>
<linearGradient id="paint32_linear_4849_11664" x1="14.671" y1="5.89495" x2="15.1414"
y2="6.36531" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint33_linear_4849_11664" x1="14.6974" y1="6.18232" x2="16.071"
y2="6.69191" gradientUnits="userSpaceOnUse">
<stop stopColor="#E87264" stopOpacity="0" />
<stop offset="1" stopColor="#FF7044" />
</linearGradient>
<linearGradient id="paint34_linear_4849_11664" x1="14.4896" y1="6.35771" x2="16.0145"
y2="6.94359" gradientUnits="userSpaceOnUse">
<stop stopColor="#E87264" stopOpacity="0" />
<stop offset="1" stopColor="#FF7044" />
</linearGradient>
<linearGradient id="paint35_linear_4849_11664" x1="15.1142" y1="6.18659" x2="14.1306"
y2="5.69106" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" stopOpacity="0" />
<stop offset="0.4415" stopColor="#FEE038" stopOpacity="0.442" />
<stop offset="1" stopColor="#FBED21" />
</linearGradient>
<linearGradient id="paint36_linear_4849_11664" x1="15.1422" y1="6.60966" x2="14.6719"
y2="7.07999" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" />
<stop offset="0.3043" stopColor="#FFCD3E" />
<stop offset="0.8558" stopColor="#FFAD2B" />
<stop offset="1" stopColor="#FFA325" />
</linearGradient>
<linearGradient id="paint37_linear_4849_11664" x1="14.8552" y1="6.63604" x2="14.3455"
y2="8.00969" gradientUnits="userSpaceOnUse">
<stop stopColor="#E87264" stopOpacity="0" />
<stop offset="1" stopColor="#FF7044" />
</linearGradient>
<linearGradient id="paint38_linear_4849_11664" x1="14.6797" y1="6.42824" x2="14.0939"
y2="7.95313" gradientUnits="userSpaceOnUse">
<stop stopColor="#E87264" stopOpacity="0" />
<stop offset="1" stopColor="#FF7044" />
</linearGradient>
<linearGradient id="paint39_linear_4849_11664" x1="14.8503" y1="7.0528" x2="15.3459"
y2="6.06919" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" stopOpacity="0" />
<stop offset="0.4415" stopColor="#FEE038" stopOpacity="0.442" />
<stop offset="1" stopColor="#FBED21" />
</linearGradient>
<radialGradient id="paint40_radial_4849_11664" cx="0" cy="0" r="1"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(14.1779 6.39904) scale(0.722725)">
<stop stopColor="#FFD945" />
<stop offset="0.4169" stopColor="#FFD744" />
<stop offset="0.6278" stopColor="#FFCF3F" />
<stop offset="0.7926" stopColor="#FFC237" />
<stop offset="0.9326" stopColor="#FFAF2C" />
<stop offset="1" stopColor="#FFA325" />
</radialGradient>
<linearGradient id="paint41_linear_4849_11664" x1="14.4457" y1="6.7225" x2="13.7518"
y2="6.02862" gradientUnits="userSpaceOnUse">
<stop stopColor="#FFD945" stopOpacity="0" />
<stop offset="1" stopColor="#FBED21" />
</linearGradient>
<linearGradient id="paint42_linear_4849_11664" x1="14.5909" y1="6.64368" x2="15.6715"
y2="5.72912" gradientUnits="userSpaceOnUse">
<stop stopColor="#E87264" stopOpacity="0" />
<stop offset="1" stopColor="#FF7044" />
</linearGradient>
<linearGradient id="paint43_linear_4849_11664" x1="14.3448" y1="6.44335" x2="14.3448"
y2="5.8964" gradientUnits="userSpaceOnUse">
<stop stopColor="white" stopOpacity="0" />
<stop offset="1" stopColor="white" />
</linearGradient>
<linearGradient id="paint44_linear_4849_11664" x1="18.2858" y1="11.587" x2="21.5647"
y2="11.587" gradientUnits="userSpaceOnUse">
<stop stopColor="#4AB272" />
<stop offset="0.3386" stopColor="#47B071" />
<stop offset="0.5502" stopColor="#3FA870" />
<stop offset="0.727" stopColor="#309B6D" />
<stop offset="0.8837" stopColor="#1C8869" />
<stop offset="1" stopColor="#077565" />
</linearGradient>
<linearGradient id="paint45_linear_4849_11664" x1="2.21457" y1="12.1846" x2="5.4935"
y2="12.1846" gradientUnits="userSpaceOnUse">
<stop stopColor="#4AB272" />
<stop offset="0.3386" stopColor="#47B071" />
<stop offset="0.5502" stopColor="#3FA870" />
<stop offset="0.727" stopColor="#309B6D" />
<stop offset="0.8837" stopColor="#1C8869" />
<stop offset="1" stopColor="#077565" />
</linearGradient>
<linearGradient id="paint46_linear_4849_11664" x1="16.5517" y1="8.96798" x2="18.8705"
y2="8.96798" gradientUnits="userSpaceOnUse">
<stop stopColor="#4AB272" />
<stop offset="0.3386" stopColor="#47B071" />
<stop offset="0.5502" stopColor="#3FA870" />
<stop offset="0.727" stopColor="#309B6D" />
<stop offset="0.8837" stopColor="#1C8869" />
<stop offset="1" stopColor="#077565" />
</linearGradient>
<linearGradient id="paint47_linear_4849_11664" x1="20.6814" y1="7.05294" x2="23.0001"
y2="7.05294" gradientUnits="userSpaceOnUse">
<stop stopColor="#4AB272" />
<stop offset="0.3386" stopColor="#47B071" />
<stop offset="0.5502" stopColor="#3FA870" />
<stop offset="0.727" stopColor="#309B6D" />
<stop offset="0.8837" stopColor="#1C8869" />
<stop offset="1" stopColor="#077565" />
</linearGradient>
<linearGradient id="paint48_linear_4849_11664" x1="4.67845" y1="7.41056" x2="6.99718"
y2="7.41056" gradientUnits="userSpaceOnUse">
<stop stopColor="#4AB272" />
<stop offset="0.3386" stopColor="#47B071" />
<stop offset="0.5502" stopColor="#3FA870" />
<stop offset="0.727" stopColor="#309B6D" />
<stop offset="0.8837" stopColor="#1C8869" />
<stop offset="1" stopColor="#077565" />
</linearGradient>
</defs>
</svg>
)
}
import React from 'react'
export default function SilverCoinIcon() {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<g clipPath="url(#clip0_4849_11736)">
<path
d="M11.5423 8.62948L13.0595 9.58857C14.0411 10.2091 14.6118 11.4799 14.5501 13.2432C14.4057 16.7741 11.7461 20.9815 8.60553 22.6186C7.04398 23.4516 5.65117 23.4812 4.66955 22.8607L3.15234 21.9016L11.5423 8.62948Z"
fill="#898BC0" />
<path
d="M11.2175 8.42389L12.7347 9.38297C13.3339 9.76172 13.7672 10.3748 14.0093 11.2057C14.1083 11.5005 14.1627 11.838 14.2009 12.2011C14.2281 12.4684 14.2348 12.7401 14.2253 13.0375C14.2212 13.2133 14.2043 13.3812 14.1748 13.5408C14.1606 13.8174 14.1128 14.0906 14.0651 14.3636C13.9783 14.7549 13.8788 15.1381 13.7585 15.526C13.6805 15.7623 13.5944 16.0113 13.4911 16.2313C13.3661 16.5984 13.2029 16.9413 13.0187 17.2889C12.9153 17.5091 12.8038 17.742 12.6749 17.9459C12.4781 18.2854 12.2686 18.6169 12.0543 18.9276C11.9126 19.1236 11.7627 19.3323 11.6084 19.52C11.3734 19.8354 11.1208 20.1219 10.8556 20.4004C10.6804 20.593 10.5003 20.7648 10.3205 20.9364C10.0136 21.2242 9.71011 21.4785 9.40199 21.712C9.17569 21.8723 8.94939 22.0327 8.70575 22.164C8.57409 22.2594 8.41716 22.3384 8.2808 22.413C8.01628 22.549 7.75976 22.6726 7.49404 22.7542C7.1752 22.8916 6.84677 22.9877 6.53814 23.0243C5.68358 23.1625 4.94401 23.0339 4.34484 22.6551L2.82767 21.6961L11.2176 8.42391L11.2175 8.42389Z"
fill="#AFB3F5" />
<path
d="M3.68202 20.3445L7.49406 22.7543C7.17523 22.8917 6.84679 22.9877 6.53817 23.0244L3.28711 20.9692L3.68202 20.3445Z"
fill="#898BC0" />
<path
d="M4.6974 18.7383L9.4019 21.7122C9.17561 21.8726 8.94931 22.0329 8.70567 22.1643L4.29443 19.3757L4.6974 18.7383Z"
fill="#898BC0" />
<path
d="M5.70495 17.1448L10.8557 20.4008C10.6804 20.5935 10.5004 20.7653 10.3205 20.9369L5.31006 17.7695L5.70495 17.1448Z"
fill="#898BC0" />
<path
d="M6.71252 15.5511L12.0545 18.928C11.9128 19.124 11.763 19.3327 11.6086 19.5204L6.31763 16.1758L6.71252 15.5511Z"
fill="#898BC0" />
<path
d="M7.7279 13.9444L13.0189 17.289C12.9154 17.5092 12.8039 17.7422 12.675 17.946L7.33301 14.5691L7.7279 13.9444Z"
fill="#898BC0" />
<path
d="M8.73524 12.3509L13.7585 15.5263C13.6805 15.7626 13.5944 16.0116 13.4911 16.2316L8.34033 12.9756L8.73524 12.3509Z"
fill="#898BC0" />
<path
d="M9.75089 10.7443L14.1749 13.541C14.1607 13.8176 14.1129 14.0908 14.0652 14.3638L9.3479 11.3818L9.75089 10.7443Z"
fill="#898BC0" />
<path
d="M10.7582 9.15071L14.0093 11.2059C14.1083 11.5007 14.1627 11.8382 14.2009 12.2013L10.3633 9.77539L10.7582 9.15071Z"
fill="#898BC0" />
<path
d="M10.8607 17.4804C13.1777 13.8152 13.3405 9.75958 11.2244 8.4219C9.10825 7.08422 5.51456 8.97105 3.19763 12.6363C0.88069 16.3015 0.717882 20.3571 2.83399 21.6948C4.95009 23.0325 8.54378 21.1456 10.8607 17.4804Z"
fill="#D8DBFF" />
<path
d="M10.2213 17.0759C12.1516 14.0224 12.2872 10.6436 10.5243 9.52916C8.76131 8.41472 5.76737 9.98666 3.8371 13.0402C1.90683 16.0937 1.7712 19.4725 3.53415 20.587C5.2971 21.7014 8.29105 20.1295 10.2213 17.0759Z"
fill="#AFB3F5" />
<path
d="M9.88781 16.8654C11.6164 14.1309 11.7379 11.105 10.1591 10.107C8.58033 9.10897 5.89913 10.5167 4.1705 13.2513C2.44186 15.9858 2.32039 19.0117 3.89918 20.0097C5.47797 21.0077 8.15917 19.6 9.88781 16.8654Z"
fill="#D8DBFF" />
<path
d="M7.06452 18.0854L6.77147 18.2393L6.79871 17.5608C6.40393 17.7191 6.11176 17.7768 5.92222 17.7339C5.58829 17.6534 5.43697 17.2966 5.46829 16.6638L6.28406 16.2355C6.30075 16.5072 6.33234 16.6786 6.37876 16.7499C6.4512 16.8609 6.60132 16.8789 6.82909 16.8038L6.88753 15.3479L6.6461 15.3946C6.26651 15.4693 6.00222 15.4345 5.85324 15.2902C5.70424 15.1459 5.63617 14.9135 5.64904 14.593C5.65755 14.3816 5.69596 14.1734 5.76434 13.9684C5.83269 13.7634 5.92476 13.5693 6.04058 13.3861C6.1901 13.1496 6.35368 12.9548 6.53136 12.8014C6.63968 12.7067 6.79689 12.5963 7.00309 12.4703L7.02127 12.0168L7.31435 11.8629L7.29584 12.3232C7.62145 12.1812 7.8746 12.1373 8.0548 12.1917C8.38394 12.257 8.54333 12.5594 8.53348 13.0986L7.73892 13.5158C7.73093 13.3219 7.70716 13.1897 7.66708 13.1196C7.59803 12.9979 7.46412 12.9814 7.26583 13.0699L7.21371 14.3689C7.68358 14.3047 7.99776 14.3011 8.15663 14.3578C8.41748 14.4545 8.53941 14.7198 8.52197 15.1539C8.49899 15.7267 8.29599 16.2405 7.91298 16.6953C7.67898 16.9739 7.40535 17.2088 7.09203 17.4L7.06452 18.0854ZM6.97252 13.2307C6.79709 13.3272 6.66506 13.4482 6.57642 13.5938C6.48776 13.7394 6.43994 13.8997 6.43291 14.0747C6.42525 14.2656 6.48262 14.3835 6.60507 14.4282C6.6731 14.4526 6.7796 14.4523 6.9245 14.4274L6.97252 13.2307ZM7.12256 16.6397C7.28057 16.5345 7.39702 16.4333 7.47088 16.3367C7.60042 16.1663 7.67064 15.9525 7.68096 15.6957C7.6888 15.5002 7.63609 15.3766 7.52335 15.3245C7.45651 15.2951 7.34039 15.2893 7.17604 15.3066L7.12256 16.6397Z"
fill="#AFB3F5" />
<path
d="M2.28924 2.62828L1.07348 3.39682C0.286894 3.89405 -0.170438 4.91241 -0.120935 6.32529C-0.00527042 9.1547 2.12594 12.5261 4.64249 13.838C5.89378 14.5055 7.00986 14.5292 7.79645 14.032L9.01221 13.2634L2.28924 2.62828Z"
fill="#898BC0" />
<path
d="M2.54976 2.46372L1.33403 3.23224C0.853907 3.53574 0.506675 4.027 0.312724 4.6928C0.233324 4.92906 0.18978 5.19952 0.159179 5.49046C0.13734 5.70466 0.131998 5.92239 0.139619 6.16067C0.142855 6.30157 0.156464 6.43612 0.180083 6.56393C0.191476 6.78557 0.229776 7.0045 0.268001 7.22331C0.337532 7.53682 0.41723 7.84391 0.513636 8.15475C0.576143 8.34409 0.64513 8.54362 0.727949 8.71991C0.828121 9.01405 0.958885 9.28885 1.10643 9.56737C1.18931 9.74382 1.27868 9.93047 1.38194 10.0938C1.53964 10.3659 1.70757 10.6315 1.87923 10.8805C1.99281 11.0375 2.11288 11.2048 2.23659 11.3552C2.42489 11.6079 2.62724 11.8375 2.83977 12.0606C2.9802 12.215 3.12446 12.3527 3.26857 12.4902C3.51447 12.7208 3.75769 12.9246 4.00459 13.1116C4.18592 13.2401 4.36726 13.3686 4.56249 13.4739C4.66799 13.5503 4.79375 13.6136 4.90301 13.6734C5.11498 13.7823 5.32053 13.8814 5.53345 13.9468C5.78894 14.0569 6.05212 14.1339 6.29943 14.1632C6.9842 14.274 7.57683 14.1709 8.05695 13.8674L9.27268 13.0989L2.54974 2.46373L2.54976 2.46372Z"
fill="#AFB3F5" />
<path
d="M8.58785 12.016L5.53321 13.947C5.7887 14.0571 6.05187 14.134 6.29918 14.1634L8.9043 12.5166L8.58785 12.016Z"
fill="#898BC0" />
<path
d="M7.77402 10.7287L4.00424 13.1117C4.18557 13.2403 4.36691 13.3687 4.56214 13.474L8.09692 11.2395L7.77402 10.7287Z"
fill="#898BC0" />
<path
d="M6.96677 9.45182L2.83943 12.0609C2.97986 12.2153 3.12412 12.3529 3.26823 12.4904L7.2832 9.95239L6.96677 9.45182Z"
fill="#898BC0" />
<path
d="M6.15964 8.17472L1.87901 10.8807C1.99259 11.0377 2.11266 11.205 2.23636 11.3554L6.47607 8.67529L6.15964 8.17472Z"
fill="#898BC0" />
<path
d="M5.34592 6.88737L1.10621 9.56748C1.1891 9.74393 1.27846 9.93057 1.38172 10.0939L5.66235 7.38794L5.34592 6.88737Z"
fill="#898BC0" />
<path
d="M4.53853 5.61025L0.513324 8.15476C0.575831 8.34409 0.644817 8.54362 0.727637 8.71991L4.85498 6.11084L4.53853 5.61025Z"
fill="#898BC0" />
<path
d="M3.72493 4.32291L0.179913 6.56387C0.191306 6.78552 0.229606 7.00445 0.267831 7.22326L4.04785 4.83374L3.72493 4.32291Z"
fill="#898BC0" />
<path
d="M2.91746 3.04606L0.312315 4.69289C0.232915 4.92914 0.189371 5.19961 0.15877 5.49055L3.23389 3.54663L2.91746 3.04606Z"
fill="#898BC0" />
<path
d="M2.83545 9.72081C0.978854 6.78383 0.848394 3.53399 2.54406 2.46208C4.23972 1.39018 7.11939 2.90213 8.97599 5.83911C10.8326 8.77609 10.963 12.0259 9.26738 13.0978C7.57171 14.1697 4.69204 12.6578 2.83545 9.72081Z"
fill="#D8DBFF" />
<path
d="M3.34776 9.39677C1.80101 6.94994 1.69233 4.24246 3.105 3.34944C4.51768 2.45643 6.91677 3.71605 8.46352 6.16288C10.0103 8.60971 10.119 11.3172 8.70628 12.2102C7.2936 13.1032 4.89451 11.8436 3.34776 9.39677Z"
fill="#AFB3F5" />
<path
d="M3.61514 9.22804C2.22996 7.0368 2.13262 4.61214 3.39773 3.81241C4.66284 3.01268 6.81132 4.14072 8.1965 6.33197C9.58168 8.52321 9.67902 10.9479 8.41391 11.7476C7.1488 12.5473 5.00032 11.4193 3.61514 9.22804Z"
fill="#D8DBFF" />
<path
d="M5.8776 10.2055L6.11243 10.3289L6.0906 9.78517C6.40694 9.91201 6.64106 9.95825 6.79294 9.92392C7.06052 9.85936 7.18177 9.57353 7.15668 9.06645L6.50299 8.72325C6.48962 8.9409 6.4643 9.0783 6.42711 9.1354C6.36906 9.22438 6.24877 9.2388 6.06625 9.17861L6.01943 8.012L6.21288 8.0494C6.51706 8.10926 6.72883 8.08137 6.84821 7.96573C6.96761 7.85012 7.02215 7.66389 7.01184 7.40706C7.00503 7.23768 6.97425 7.07084 6.91945 6.90658C6.86468 6.74227 6.7909 6.58677 6.69809 6.43995C6.57829 6.25048 6.4472 6.09431 6.30483 5.97141C6.21803 5.89551 6.09205 5.80709 5.92682 5.70609L5.91226 5.34271L5.6774 5.21941L5.69224 5.58824C5.43132 5.47443 5.22847 5.43923 5.08408 5.4829C4.82033 5.5352 4.69261 5.77751 4.7005 6.20953L5.3372 6.54385C5.3436 6.38852 5.36264 6.2826 5.39476 6.22637C5.45009 6.12885 5.55739 6.11565 5.71629 6.18658L5.75805 7.2275C5.38154 7.17602 5.12978 7.17312 5.00248 7.21859C4.79345 7.29606 4.69575 7.50864 4.70972 7.85654C4.72814 8.31553 4.8908 8.72721 5.19771 9.09164C5.38522 9.31489 5.60449 9.50314 5.85555 9.65633L5.8776 10.2055ZM5.95132 6.31539C6.0919 6.39273 6.19769 6.48974 6.26872 6.60639C6.33976 6.72302 6.37808 6.85147 6.38371 6.99172C6.38985 7.14474 6.34388 7.23916 6.24577 7.27501C6.19124 7.29455 6.10591 7.29429 5.9898 7.27434L5.95132 6.31539ZM5.83109 9.04713C5.70447 8.96282 5.61116 8.88174 5.55198 8.8043C5.44817 8.66778 5.3919 8.49647 5.38363 8.29066C5.37736 8.13401 5.41959 8.03494 5.50993 7.99323C5.56349 7.96966 5.65654 7.965 5.78823 7.97887L5.83109 9.04713Z"
fill="#AFB3F5" />
<path
d="M23.2357 8.70983L23.525 11.1612C23.7123 12.7472 22.8489 14.4574 20.9119 15.9184C17.015 18.8221 10.2172 19.6245 5.74858 17.6875C3.50643 16.7407 2.2686 15.2785 2.08137 13.6925L1.79199 11.2412L23.2357 8.70983Z"
fill="#898BC0" />
<path
d="M23.1736 8.18488L23.463 10.6362C23.5773 11.6042 23.2977 12.5981 22.6197 13.5762C22.3905 13.9374 22.077 14.2877 21.7223 14.6429C21.4603 14.9035 21.1758 15.146 20.8499 15.3933C20.6586 15.5413 20.4645 15.6686 20.2686 15.7752C19.9608 15.9996 19.6276 16.1851 19.2946 16.3706C18.8015 16.6168 18.306 16.8424 17.7874 17.0498C17.4674 17.1711 17.1269 17.2948 16.8023 17.3749C16.302 17.5592 15.7943 17.6819 15.2635 17.7862C14.9387 17.8664 14.5933 17.949 14.264 17.9879C13.7308 18.0717 13.1952 18.1349 12.6778 18.1751C12.3457 18.1934 11.993 18.2141 11.6588 18.2118C11.1183 18.2339 10.5936 18.2122 10.0664 18.1701C9.70886 18.1497 9.36945 18.1061 9.03038 18.0627C8.45716 17.9841 7.92268 17.8801 7.40647 17.7531C7.03918 17.6502 6.67193 17.5473 6.3206 17.4008C6.10466 17.3428 5.88443 17.2435 5.68665 17.1625C5.31229 16.9977 4.95811 16.8307 4.64077 16.6175C4.21789 16.3959 3.83085 16.1283 3.52443 15.8303C2.63673 15.0371 2.13364 14.1357 2.01936 13.1676L1.72999 10.7164L23.1736 8.18493L23.1736 8.18488Z"
fill="#AFB3F5" />
<path
d="M3.91364 10.4585L4.64072 16.6176C4.21784 16.3959 3.8308 16.1283 3.52438 15.8303L2.9043 10.5776L3.91364 10.4585Z"
fill="#898BC0" />
<path
d="M6.50918 10.1521L7.40648 17.7531C7.03919 17.6503 6.67194 17.5474 6.32061 17.4009L5.47925 10.2737L6.50918 10.1521Z"
fill="#898BC0" />
<path
d="M9.084 9.84814L10.0664 18.1701C9.70885 18.1497 9.36944 18.1062 9.03037 18.0627L8.07471 9.96729L9.084 9.84814Z"
fill="#898BC0" />
<path
d="M11.659 9.54418L12.6778 18.1752C12.3458 18.1935 11.993 18.2142 11.6588 18.2119L10.6497 9.66333L11.659 9.54418Z"
fill="#898BC0" />
<path
d="M14.2544 9.23779L15.2636 17.7863C14.9388 17.8665 14.5934 17.9491 14.264 17.988L13.2451 9.35693L14.2544 9.23779Z"
fill="#898BC0" />
<path
d="M16.8294 8.93383L17.7875 17.0499C17.4676 17.1711 17.127 17.2948 16.8025 17.3749L15.8201 9.05298L16.8294 8.93383Z"
fill="#898BC0" />
<path
d="M19.4248 8.62743L20.2686 15.7753C19.9608 15.9996 19.6275 16.1852 19.2945 16.3707L18.3948 8.74902L19.4248 8.62743Z"
fill="#898BC0" />
<path
d="M21.9998 8.32348L22.6199 13.5762C22.3907 13.9374 22.0772 14.2878 21.7224 14.643L20.9905 8.44263L21.9998 8.32348Z"
fill="#898BC0" />
<path
d="M13.1901 15.6469C19.112 14.9478 23.5854 11.6095 23.1818 8.19051C22.7781 4.77154 17.6504 2.56664 11.7285 3.26571C5.8067 3.96478 1.33329 7.30311 1.7369 10.7221C2.14051 14.141 7.26829 16.3459 13.1901 15.6469Z"
fill="#D8DBFF" />
<path
d="M13.0681 14.6139C18.0017 14.0315 21.7285 11.2503 21.3923 8.40189C21.056 5.55351 16.784 3.71657 11.8505 4.29898C6.91691 4.88138 3.19007 7.66258 3.52632 10.511C3.86257 13.3593 8.13459 15.1963 13.0681 14.6139Z"
fill="#AFB3F5" />
<path
d="M13.0046 14.075C17.4228 13.5534 20.7604 11.0627 20.4593 8.51191C20.1581 5.96107 16.3324 4.31603 11.9142 4.8376C7.49597 5.35917 4.15842 7.84984 4.45954 10.4007C4.76067 12.9515 8.58644 14.5966 13.0046 14.075Z"
fill="#D8DBFF" />
<path
d="M9.25625 12.1156L8.83806 11.9358L9.58645 11.3774C9.07546 11.0927 8.7608 10.8306 8.64242 10.591C8.4393 10.1645 8.68931 9.69397 9.39242 9.1794L10.5564 9.67994C10.2807 9.93298 10.1249 10.1152 10.089 10.2265C10.0331 10.4001 10.1439 10.576 10.4214 10.7543L12.0272 9.55591L11.7683 9.33843C11.3597 8.99762 11.168 8.68515 11.1932 8.40103C11.2183 8.11691 11.4076 7.84294 11.7611 7.57912C11.9943 7.40514 12.25 7.26587 12.5282 7.1614C12.8064 7.05683 13.0934 6.98713 13.3895 6.95218C13.7715 6.90713 14.1214 6.91309 14.4391 6.97008C14.6341 7.00376 14.8881 7.07614 15.2013 7.18726L15.7015 6.81395L16.1197 6.99378L15.612 7.37262C16.0457 7.59745 16.3118 7.82984 16.4097 8.06952C16.625 8.47765 16.44 8.90979 15.8555 9.36618L14.7217 8.8787C14.9219 8.70229 15.0425 8.56243 15.0828 8.45884C15.153 8.27969 15.0546 8.12238 14.7883 7.98721L13.3555 9.05651C13.8311 9.5028 14.107 9.83528 14.184 10.0541C14.3066 10.4165 14.1288 10.7765 13.6499 11.1339C13.0181 11.6054 12.2935 11.8334 11.476 11.8182C10.9757 11.8095 10.4878 11.7206 10.0122 11.5515L9.25625 12.1156ZM14.3626 7.8131C14.1075 7.70928 13.8639 7.67308 13.6316 7.70447C13.3994 7.7358 13.1867 7.82354 12.9937 7.9676C12.783 8.1248 12.7068 8.28812 12.7651 8.45767C12.798 8.55147 12.8905 8.66495 13.0426 8.79818L14.3626 7.8131ZM10.8508 10.9257C11.1 11.0034 11.309 11.0401 11.4762 11.0353C11.7704 11.0262 12.0595 10.9161 12.3428 10.7046C12.5585 10.5437 12.6449 10.3803 12.6029 10.2148C12.5764 10.118 12.482 9.98888 12.3212 9.82831L10.8508 10.9257Z"
fill="#AFB3F5" />
</g>
<defs>
<clipPath id="clip0_4849_11736">
<rect width="24" height="24" fill="white" />
</clipPath>
</defs>
</svg>
)
}
......@@ -38,7 +38,7 @@ export const PATH = {
},
USER: {
GAMES: {
ROOT: "/user/games",
ROOT: "/exclusive-games",
}
}
}
\ No newline at end of file
"use client";
import React from "react";
import { useRouter } from "next/navigation";
import { useAppDispatch, useAppSelector } from "@/hooks/hook";
import { openAuthModal } from "@/slice/authModalSlice";
interface Props {
href: string;
className?: string;
children: React.ReactNode;
}
export default function ProtectedLink({ href, className, children }: Props) {
const user = useAppSelector((s) => s.auth.user);
const dispatch = useAppDispatch();
const router = useRouter();
const handleClick = (e: React.MouseEvent) => {
e.preventDefault();
if (user) {
router.push(href);
} else {
dispatch(openAuthModal());
}
};
return (
<a href={href} onClick={handleClick} className={className}>
{children}
</a>
);
}
// lib/serverApi.ts
import { GameResponseProps, SingleGameResponse } from "@/types/game";
import { serverBaseQuery } from "./serverBaseQuery";
import { store } from "@/hooks/store";
export async function getAllGames(): Promise<GameResponseProps> {
// No token required
return serverBaseQuery<GameResponseProps>("/api/get-games");
}
console.log(store.getState());
export async function getSingleGame(id: string): Promise<SingleGameResponse> {
return serverBaseQuery<SingleGameResponse>(`/api/game/${id}`, {
token: store.getState().auth.access_token,
withAuth: true,
});
}
\ No newline at end of file
// lib/baseQuery.ts
import { RootState } from "@/hooks/store";
export async function serverBaseQuery<T>(
endpoint: string,
{
method = "GET",
token,
body,
cache = "no-store",
withAuth = false,
}: {
method?: string;
token?: string;
body?: unknown;
cache?: RequestCache;
withAuth?: boolean;
} = {}
): Promise<T> {
console.log("state", token);
const res = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}${endpoint}`, {
method,
cache,
headers: {
"Content-Type": "application/json",
...(token ? { Authorization: `Bearer ${token}` } : {}),
},
...(body ? { body: JSON.stringify(body) } : {}),
});
if (!res.ok) throw new Error(`Request failed: ${res.status} ${res.statusText}`);
return res.json();
}
import { createApi } from "@reduxjs/toolkit/query/react";
import { baseQuery } from "./baseQuery";
import { PlayerListResponse, PlayerProps, SinlgePlayerResponseProps, } from "@/types/player";
import { GlobalResponse } from "@/types/config";
import { GlobalResponse, QueryParams } from "@/types/config";
export const playerApi = createApi({
reducerPath: "playerApi",
......@@ -16,11 +16,19 @@ export const playerApi = createApi({
}),
invalidatesTags: ["players"]
}),
getAllPlayer: builder.query<PlayerListResponse, void>({
query: () => ({
url: "/api/admin/get-users",
method: "GET"
}),
getAllPlayer: builder.query<PlayerListResponse, QueryParams>({
query: ({ search, page, per_page }) => {
const params = new URLSearchParams();
if (search) params.append('search', search);
if (page) params.append('page', page.toString());
if (per_page) params.append('page_size', per_page.toString());
const queryString = params.toString();
return {
url: `/api/admin/get-users${queryString ? `?${queryString}` : ''}`,
method: "GET"
}
},
providesTags: ['players']
}),
getPlayerById: builder.query<SinlgePlayerResponseProps, { id: number }>({
......@@ -30,24 +38,24 @@ export const playerApi = createApi({
}),
providesTags: ['players']
}),
getPlayerBalanceById: builder.query<SinlgePlayerResponseProps, { id: number }>({
getPlayerBalanceById: builder.query<SinlgePlayerResponseProps, { id: string }>({
query: ({ id }) => ({
url: `/api/admin/get-balance/${id}`,
method: "GET"
}),
providesTags: ['players']
}),
updatePlayerById: builder.mutation<SinlgePlayerResponseProps, { id: number, data: FormData }>({
query: ({ id, data }) => ({
updatePlayerById: builder.mutation<SinlgePlayerResponseProps, { id: string, body: FormData }>({
query: ({ id, body }) => ({
url: `/api/admin/update-user/${id}`,
method: "POST",
body: data
body: body
}),
invalidatesTags: ["players"]
}),
deletePlayerById: builder.mutation<GlobalResponse, { id: string }>({
query: ({ id }) => ({
url: `/api/admin/update-user/${id}`,
url: `/api/admin/user/${id}`,
method: "DELETE",
}),
invalidatesTags: ["players"]
......
// src/slice/uiSlice.ts
import { createSlice } from "@reduxjs/toolkit";
interface authModalSlice {
authModalOpen: boolean;
}
const initialState: authModalSlice = {
authModalOpen: false,
};
const authModalSlice = createSlice({
name: "authModalSlice",
initialState,
reducers: {
openAuthModal(state) {
state.authModalOpen = true;
},
closeAuthModal(state) {
state.authModalOpen = false;
},
},
});
export const { openAuthModal, closeAuthModal } = authModalSlice.actions;
export default authModalSlice.reducer;
......@@ -16,7 +16,7 @@ let localStorageUser = null;
if (tokens) {
try {
const parsedTokens = JSON.parse(tokens);
localStorageAccessToken = parsedTokens.accessToken || "";
localStorageAccessToken = parsedTokens.access_token || "";
localStorageRefreshToken = parsedTokens.refreshToken || "";
localStorageUser = parsedTokens.user || "";
} catch (error) {
......@@ -36,20 +36,20 @@ export const authSlice = createSlice({
initialState,
reducers: {
setTokens: (state, action) => {
const { accessToken, refreshToken, user } = action.payload;
state.access_token = accessToken;
const { access_token, refreshToken, user } = action.payload;
state.access_token = access_token;
// state.refreshToken = refreshToken;
state.user = user;
localStorage.setItem(
"token",
JSON.stringify({ accessToken, refreshToken, user }),
JSON.stringify({ access_token, refreshToken, user }),
);
if (isBrowser) {
localStorage.setItem(
"token",
JSON.stringify({ accessToken, refreshToken, user }),
JSON.stringify({ access_token, refreshToken, user }),
);
}
},
......
......@@ -99,14 +99,12 @@ export default function Palette(mode: ThemeMode) {
},
},
},
MuiOutlinedInput: {
styleOverrides: {
root: {
fontSize: "14px",
width: "100%",
borderRadius: "var(--border-radius-lg, 10px)",
borderRadius: "10px",
// border: "1px solid var(--Gray, #E0E0E3)",
background: "transparent",
color: "inherit",
......@@ -130,6 +128,25 @@ export default function Palette(mode: ThemeMode) {
},
},
},
MuiCheckbox: {
styleOverrides: {
root: {
padding: 0,
width: 20,
height: 20,
"& .MuiSvgIcon-root": {
fontSize: 20,
borderRadius: 4,
border: "1px solid #71717A",
},
"&.Mui-checked .MuiSvgIcon-root": {
backgroundColor: "#7C3AED",
color: "#fff",
border: "1px solid #7C3AED",
},
},
},
},
MuiIconButton: {
styleOverrides: {
root: {
......@@ -269,7 +286,41 @@ export default function Palette(mode: ThemeMode) {
padding: "16px 8px"
}
}
}
},
MuiPaginationItem: {
styleOverrides: {
root: {
fontSize: "12px",
color: "#71717A",
width: 28,
height: 28,
display: "flex",
alignItems: "center",
justifyContent: "center",
borderRadius: "4px",
border: "1px solid #E0E0E3",
fontWeight: 500,
"&:hover": {
border: "1px solid #B801C0",
background: " #F8B1FE",
},
"&.Mui-selected": {
border: "1px solid #B801C0",
background: " #F8B1FE",
color: "#B801C0",
},
},
},
},
MuiPagination: {
styleOverrides: {
ul: {
gap: "8px", // sets the spacing between pagination items
},
},
},
},
});
......
......@@ -22,16 +22,16 @@ export default function ThemeCustomization({ children }: { children: React.React
React.useEffect(() => {
if (!user || !user.role) {
setTheme(ThemeMode.DARK);
setPalette(AdminPalette(ThemeMode.DARK));
} else if (user.role.toUpperCase() === "USER") {
setTheme(ThemeMode.DARK);
setPalette(Palette(ThemeMode.DARK));
} else if (user.role.toUpperCase() === "ADMIN") {
setTheme(ThemeMode.LIGHT);
setPalette(AdminPalette(ThemeMode.LIGHT));
} else {
setTheme(ThemeMode.LIGHT);
setPalette(Palette(ThemeMode.LIGHT));
setPalette(AdminPalette(ThemeMode.LIGHT));
}
}, [user]);
// const customTheme = Palette(theme);
return (
<StyledEngineProvider injectFirst>
......
......@@ -74,7 +74,6 @@ export default function Palette(mode: ThemeMode) {
root: {
// color: 'rgba(255, 255, 255, 0.80)',
color: titleColors[0],
fontFamily: '"Hiragino Sans"',
fontSize: '12px',
fontWeight: 400,
lineHeight: 'normal',
......
......@@ -31,4 +31,10 @@ export interface GlobalResponse {
status: string;
data: [],
message: string
}
export interface QueryParams {
page?: number;
per_page?: number;
search?: string;
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ export interface FileResponse {
export interface CommonGameProps {
name: string;
category?: string;
description: string;
api: string;
provider: string;
......
import { ImageProps } from "./config";
import { Pagination } from "./game";
export interface PlayerProps {
export interface CommonPlayerProps {
name: string;
email: string;
first_name: string;
......@@ -12,11 +13,12 @@ export interface PlayerProps {
phone?: string;
password: string;
password_confirmation: string;
}
export interface PlayerProps extends CommonPlayerProps {
profile_image: File | null;
profile_image_file?: string;
}
export const initialPlayerValues: PlayerProps = {
name: "",
email: "",
......@@ -31,12 +33,13 @@ export const initialPlayerValues: PlayerProps = {
profile_image: null,
};
export interface PlayerItem extends PlayerProps {
export interface PlayerItem extends CommonPlayerProps {
id: string;
registered_date: string | Date;
current_credit?: string,
total_withdrawl?: string,
total_deposited?: string
profile_image_file?: string;
}
export interface PlayerListResponse {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment