Commit 63d0ac0b by Arjun Jhukal

added credentials for authorize user

parent 27eeae72
...@@ -15,7 +15,7 @@ export default function Support() { ...@@ -15,7 +15,7 @@ export default function Support() {
</div> </div>
<div className="grid xl:grid-cols-3 lg:grid-cols-2 grid-cols-1 gap-6"> <div className="grid xl:grid-cols-3 lg:grid-cols-2 grid-cols-1 gap-6">
<GlassWrapper className="p-6"> {/* <GlassWrapper className="p-6">
<img <img
src="/assets/images/chat.svg" src="/assets/images/chat.svg"
alt="chat" alt="chat"
...@@ -33,7 +33,7 @@ export default function Support() { ...@@ -33,7 +33,7 @@ export default function Support() {
}}> }}>
Start Live Chat Start Live Chat
</a> </a>
</GlassWrapper> </GlassWrapper> */}
<GlassWrapper className="p-6"> <GlassWrapper className="p-6">
<img <img
src="/assets/images/support.svg" src="/assets/images/support.svg"
...@@ -44,7 +44,7 @@ export default function Support() { ...@@ -44,7 +44,7 @@ export default function Support() {
<p className="text-[11px] mb-8"> <p className="text-[11px] mb-8">
Questions about your account or gameplay? Our team is here for you. Questions about your account or gameplay? Our team is here for you.
</p> </p>
<Link href="#" className="underline">support@sweepstakeonline.com</Link> <Link href="mailto:support@sweepstakeonline.com" className="underline">support@sweepstakeonline.com</Link>
</GlassWrapper> </GlassWrapper>
<GlassWrapper className="p-6"> <GlassWrapper className="p-6">
<img <img
...@@ -56,7 +56,7 @@ export default function Support() { ...@@ -56,7 +56,7 @@ export default function Support() {
<p className="text-[11px] mb-8"> <p className="text-[11px] mb-8">
Questions about your account or gameplay? Our team is here for you. Questions about your account or gameplay? Our team is here for you.
</p> </p>
<Link href="#" className="underline">technical@sweepstakeonline.com</Link> <Link href="mailto:technical@sweepstakeonline.com" className="underline">technical@sweepstakeonline.com</Link>
</GlassWrapper> </GlassWrapper>
</div> </div>
</section> </section>
......
...@@ -12,6 +12,7 @@ import { ...@@ -12,6 +12,7 @@ import {
Home, Home,
StatusUp, StatusUp,
MessageQuestion, MessageQuestion,
PasswordCheck,
} from "@wandersonalwes/iconsax-react"; } from "@wandersonalwes/iconsax-react";
import Link from "next/link"; import Link from "next/link";
import { usePathname } from "next/navigation"; import { usePathname } from "next/navigation";
...@@ -34,12 +35,13 @@ const staticMenus = [ ...@@ -34,12 +35,13 @@ const staticMenus = [
path: PATH.USER.GAMES.ROOT, path: PATH.USER.GAMES.ROOT,
match: (pathname: string) => pathname.startsWith(PATH.USER.GAMES.ROOT), match: (pathname: string) => pathname.startsWith(PATH.USER.GAMES.ROOT),
}, },
// { {
// name: "FAQ & Help", name: "Credentials",
// icon: <MessageQuestion size={18} />, icon: <PasswordCheck size={18} />,
// path: "/faq", path: "/credentials",
// match: (pathname: string) => pathname.startsWith("/faq"), match: (pathname: string) => pathname.startsWith("/credentials"),
// }, requireAuth: true
},
]; ];
export default function UserMenu({ open }: { open: boolean }) { export default function UserMenu({ open }: { open: boolean }) {
...@@ -123,7 +125,8 @@ export default function UserMenu({ open }: { open: boolean }) { ...@@ -123,7 +125,8 @@ export default function UserMenu({ open }: { open: boolean }) {
{/* 🧩 Loop Static Menus */} {/* 🧩 Loop Static Menus */}
{staticMenus.map((menu) => { {staticMenus.map((menu) => {
const isActive = menu.match(pathname); const isActive = menu.match(pathname);
return (
const menuItem = (
<ListItem <ListItem
key={menu.name} key={menu.name}
onMouseEnter={handleMouseEnter} onMouseEnter={handleMouseEnter}
...@@ -131,10 +134,8 @@ export default function UserMenu({ open }: { open: boolean }) { ...@@ -131,10 +134,8 @@ export default function UserMenu({ open }: { open: boolean }) {
> >
<Link <Link
href={menu.path} href={menu.path}
className={`flex gap-2 items-center px-4 py-2 rounded-md transition-all ${[ className={`flex gap-2 items-center px-4 py-2 rounded-md transition-all ${[open ? "expanded" : "collapsed", isActive ? "active__menu" : ""].join(" ")
open ? "expanded" : "collapsed", }`}
isActive ? "active__menu" : "",
].join(" ")}`}
> >
<ListItemIcon>{menu.icon}</ListItemIcon> <ListItemIcon>{menu.icon}</ListItemIcon>
<ListItemText <ListItemText
...@@ -144,6 +145,9 @@ export default function UserMenu({ open }: { open: boolean }) { ...@@ -144,6 +145,9 @@ export default function UserMenu({ open }: { open: boolean }) {
</Link> </Link>
</ListItem> </ListItem>
); );
// Wrap with <Private> only if requireAuth is true
return menu.requireAuth ? <Private key={menu.name}>{menuItem}</Private> : menuItem;
})} })}
</List> </List>
......
...@@ -41,7 +41,7 @@ export default function ExclusiveGameDetail({ game }: { game: SingleGameResponse ...@@ -41,7 +41,7 @@ export default function ExclusiveGameDetail({ game }: { game: SingleGameResponse
<UserCoin slug={game?.data?.provider} /> <UserCoin slug={game?.data?.provider} />
{game?.data?.provider == "goldcoincity" ? "": {game?.data?.provider == "goldcoincity" ? "" :
<Box sx={{ <Box sx={{
borderRadius: "16px" borderRadius: "16px"
}} className="flex justify-center items-center gap-2 py-4 px-6 bg-secondary-grad text-title ss-btn"> }} className="flex justify-center items-center gap-2 py-4 px-6 bg-secondary-grad text-title ss-btn">
...@@ -63,7 +63,7 @@ export default function ExclusiveGameDetail({ game }: { game: SingleGameResponse ...@@ -63,7 +63,7 @@ export default function ExclusiveGameDetail({ game }: { game: SingleGameResponse
</div> </div>
<div className="game_cred"> <div className="game_cred md:max-w-1/2">
<h2 className="text-[24px]">Credentials for {game?.data?.name}</h2> <h2 className="text-[24px]">Credentials for {game?.data?.name}</h2>
<SingleGameCred username={game?.data?.user?.name || ""} password={game?.data?.user?.password || ""} /> <SingleGameCred username={game?.data?.user?.name || ""} password={game?.data?.user?.password || ""} />
</div> </div>
......
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