Skip to content

Commit

Permalink
fcl
Browse files Browse the repository at this point in the history
  • Loading branch information
imhson committed Feb 21, 2024
2 parents 1b53826 + 107b837 commit 1934611
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions app/components/homeComponents/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ export default function HomePage() {
const [value, setValue] = useState('')
const [errorMsg, setErrorMsg] = useState('')
const config = getConfig()
const { data } = useSWR('https://worldtimeapi.org/api/timezone/Asia/Ho_Chi_Minh', (url) =>
fetch(url).then((r) => r.json())
)

const connectXHandler = () => {
window.location.href = `${config.REST_API_ENDPOINT}/auth/twitter`
Expand All @@ -52,8 +49,19 @@ export default function HomePage() {
}
}
}
if (!account?.refferal_code) {
return (
<main className='relative min-h-screen'>
{/* background */}
<div className='absolute inset-0 overflow-hidden flex flex-col items-center'>
<Image src={Background} alt='' className='w-full min-w-[1008px] hidden sm:block' />
<Image src={MBackground} alt='' className='w-full min-w-[375px] mt-[50px] sm:hidden' />
</div>
</main>
)
}

if (account && !account.code) {
if (account && !account.code && account.refferal_code?.length > 1) {
return (
<main className='relative min-h-screen'>
{/* background */}
Expand Down

0 comments on commit 1934611

Please sign in to comment.