import { Spinner } from '@my/ui'
import { useRouter } from 'solito/router'
import { useEffect } from 'react'

export const RedirectToNewPostPage = () => {
  const router = useRouter()

  useEffect(() => {
    router.push('/post/new')
  }, [router])

  return (
    <Spinner
      size="large"
      color="#fff"
      display="flex"
      ai="center"
      jc="center"
      style={{ height: '100vh' }}
    />
  )
}
