You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
747 B
25 lines
747 B
import { Container } from '@chakra-ui/react'
|
|
import Router from 'next/router'
|
|
import { useEffect } from 'react'
|
|
import { useSelector } from 'react-redux'
|
|
import FeaturesSection from '../components/home/FeaturesSection'
|
|
import HowItWorksSection from '../components/home/HowItWorksSection'
|
|
import IntroSection from '../components/home/IntroSection'
|
|
import { selectAuth } from '../store/authReducer'
|
|
|
|
export default function HomePage() {
|
|
const { accessToken, user } = useSelector(selectAuth)
|
|
useEffect(() => {
|
|
if (accessToken && user) {
|
|
Router.push('/dashboard')
|
|
}
|
|
}, [accessToken, user])
|
|
|
|
return (
|
|
<Container maxW={'7xl'}>
|
|
<IntroSection />
|
|
<FeaturesSection />
|
|
<HowItWorksSection />
|
|
</Container>
|
|
)
|
|
}
|