From f76ce82c7834bf0ca72a0662ae7cf59d8fb8ea0e Mon Sep 17 00:00:00 2001 From: ttang Date: Thu, 8 Feb 2024 21:35:16 +0800 Subject: [PATCH] feat: obarding with type --- apps/u3/src/components/layout/Index.tsx | 53 ++++++++++++------------ apps/u3/src/components/onboard/Claim.tsx | 12 ++++-- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/apps/u3/src/components/layout/Index.tsx b/apps/u3/src/components/layout/Index.tsx index 41df61ab..d2abfb5f 100644 --- a/apps/u3/src/components/layout/Index.tsx +++ b/apps/u3/src/components/layout/Index.tsx @@ -32,34 +32,33 @@ function Layout() { return ( - {(claim === 'true' && ) || ( - <> - {ready ? isMobile ? : : null} - {ready && isMobile ? : null} - {isMobile ? ( - -
-
- -
- - ) : ( - - - {location.pathname.includes('social') ? ( + <> + {ready ? isMobile ? : : null} + {ready && isMobile ? : null} + {isMobile ? ( + +
+
+ +
+ + ) : ( + + + {location.pathname.includes('social') ? ( +
+ ) : ( +
- ) : ( - -
- - )} - - - - )} - - - )} + + )} + + + + )} + + {claim === 'true' && } + { console.log('claimAction', claimStatus); + if (type !== 'spin') { + navigate('/'); + return; + } if (claimStatus.statusCode === 102) { navigate('/'); return; @@ -42,10 +48,10 @@ export default function ClaimOnboard() { } catch (e) { console.error(e); } - }, [currFid, claimStatus, navigate]); + }, [currFid, claimStatus, navigate, type]); return ( -
+
🎉 @@ -66,7 +72,7 @@ export default function ClaimOnboard() {