This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from XcavateBlockchain/feat/game-mode
feat: fetch user data
- Loading branch information
Showing
16 changed files
with
126 additions
and
58 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use client'; | ||
|
||
import { useSubstrateContext } from '@/context/polkadot-contex'; | ||
import { formatAddress, formatNumber } from '@/lib/utils'; | ||
import Image from 'next/image'; | ||
|
||
export default function ProfileHeader({ points }: { points: number }) { | ||
const { address } = useSubstrateContext(); | ||
|
||
return ( | ||
<div className="flex w-full items-center justify-between pb-10"> | ||
<div className="flex items-center gap-[17px]"> | ||
<Image | ||
src={'/images/profile.jpeg'} | ||
alt="profile" | ||
width={53} | ||
height={53} | ||
className=" rounded-full border-4 border-primary-400 shadow-profile" | ||
priority | ||
/> | ||
<div> | ||
<span className="rounded-3xl bg-[#DC7DA6]/[0.25] px-2 py-[2px] text-[0.875rem]/[0.025rem] font-extralight"> | ||
{formatAddress(address)} | ||
</span> | ||
</div> | ||
</div> | ||
<div className="space-x-2 text-[1.0625rem]/[1.5rem] font-light"> | ||
<span>Points:</span> | ||
<span className="text-primary-400">{formatNumber(points)}X</span> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
import SiteFooter from '@/components/layouts/site-footer'; | ||
import { SiteHeader } from '@/components/layouts/site-header'; | ||
import SubstrateContextProvider from '@/context/polkadot-contex'; | ||
// import SubstrateContextProvider from '@/context/polkadot-contex'; | ||
import type { Metadata } from 'next'; | ||
|
||
export const metadata: Metadata = { | ||
title: 'Create Next App', | ||
description: 'Generated by create next app' | ||
}; | ||
|
||
// const SubstrateContextProvider = dynamic(() => import('@/context/polkadot-contex'), { | ||
// ssr: false | ||
// }); | ||
|
||
export default function PageLayout({ | ||
children | ||
}: Readonly<{ | ||
children: React.ReactNode; | ||
}>) { | ||
return ( | ||
<SubstrateContextProvider> | ||
<div className='w-full bg-[url("/images/bg-blur.svg")] bg-cover bg-center bg-no-repeat'> | ||
<SiteHeader /> | ||
<main className="w-full">{children}</main> | ||
<SiteFooter /> | ||
</div> | ||
</SubstrateContextProvider> | ||
// <SubstrateContextProvider> | ||
<div className='w-full bg-[url("/images/bg-blur.svg")] bg-cover bg-center bg-no-repeat'> | ||
<SiteHeader /> | ||
<main className="w-full">{children}</main> | ||
<SiteFooter /> | ||
</div> | ||
// </SubstrateContextProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters