import Head from 'next/head' import { useEffect, useState } from 'react' import { useCookies } from 'react-cookie' import { Card, CardFiles, CardRegister, CardSettings, CardSignIn } from '../components/home/cards' import Description from '../components/home/description' import Grid from '../components/home/grid' import Title from '../components/home/title' import { links } from '../config' export default function Home() { const [cookies] = useCookies(["token"]) const [cards, setCards] = useState() useEffect(() => { if (cookies.token) { setCards() } }, [setCards, cookies]) return ( <> HomeDisk Welcome to <a href={links.github} target="_blank" rel="noreferrer">HomeDisk!</a> Fast and lightweight local cloud for your data written in Rust {cards} ) } function CardsNonLogged() { return ( <>

Sign in →

Log in to your account

Register →

Register a new account

) } function CardsLogged() { return ( <>

Files →

View your files

Settings →

Go to user settings

) }