Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: obarding with type #533

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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