Skip to content

Commit

Permalink
Merge pull request #533 from us3r-network/F-obardingType-ttang
Browse files Browse the repository at this point in the history
feat: obarding with type
  • Loading branch information
Tonyce authored Feb 8, 2024
2 parents 637eab7 + f76ce82 commit 32bc854
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 30 deletions.
53 changes: 26 additions & 27 deletions apps/u3/src/components/layout/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,33 @@ function Layout() {

return (
<LayoutWrapper id="layout-wrapper">
{(claim === 'true' && <ClaimOnboard />) || (
<>
{ready ? isMobile ? <MobileHeader /> : <Menu /> : null}
{ready && isMobile ? <MobileNav /> : null}
{isMobile ? (
<MobileContentBox>
<Main />
<div className="fixed right-[20px] bottom-[80px]">
<AddPostMobile />
</div>
</MobileContentBox>
) : (
<RightBox>
<RightInner id="layout-main-wrapper">
{location.pathname.includes('social') ? (
<>
{ready ? isMobile ? <MobileHeader /> : <Menu /> : null}
{ready && isMobile ? <MobileNav /> : null}
{isMobile ? (
<MobileContentBox>
<Main />
<div className="fixed right-[20px] bottom-[80px]">
<AddPostMobile />
</div>
</MobileContentBox>
) : (
<RightBox>
<RightInner id="layout-main-wrapper">
{location.pathname.includes('social') ? (
<Main />
) : (
<MainBox className="main-box">
<Main />
) : (
<MainBox className="main-box">
<Main />
</MainBox>
)}
</RightInner>
<DappMenu />
</RightBox>
)}
<MobileGuide />
</>
)}
</MainBox>
)}
</RightInner>
<DappMenu />
</RightBox>
)}
<MobileGuide />
{claim === 'true' && <ClaimOnboard />}
</>
<ToastContainer
position="top-right"
autoClose={3000}
Expand Down
12 changes: 9 additions & 3 deletions apps/u3/src/components/onboard/Claim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ export default function ClaimOnboard() {
} = useFarcasterCtx();
const { address } = useAccount();

const type = searchParams.get('type');

const claimAction = useCallback(async () => {
console.log('claimAction', claimStatus);
if (type !== 'spin') {
navigate('/');
return;
}
if (claimStatus.statusCode === 102) {
navigate('/');
return;
Expand All @@ -42,10 +48,10 @@ export default function ClaimOnboard() {
} catch (e) {
console.error(e);
}
}, [currFid, claimStatus, navigate]);
}, [currFid, claimStatus, navigate, type]);

return (
<div className="w-screen h-screen flex justify-center items-center">
<div className="absolute z-20 top-0 left-0 bg-[#14171A] w-screen h-screen flex justify-center items-center">
<div className="w-full md:w-[840px] text-white">
<div className="flex items-center justify-center mb-7 md:mb-0">
<span className="hidden md:inline-block text-[80px]">🎉</span>
Expand All @@ -66,7 +72,7 @@ export default function ClaimOnboard() {
</div>
<div
className={cn(
' border rounded-2xl border-[#39424C]',
' border rounded-2xl border-[#39424C] bg-[#1B1E23]',
'p-5 flex flex-col gap-8 text-white',
'm-2 md:w-full'
)}
Expand Down

0 comments on commit 32bc854

Please sign in to comment.