diff --git a/components/Frontpage.tsx b/components/Frontpage.tsx index 40a0669..d7e15b6 100644 --- a/components/Frontpage.tsx +++ b/components/Frontpage.tsx @@ -20,24 +20,20 @@ import { usePWAInstall } from 'react-use-pwa-install' import logo from '../public/images/app-icon/favicon.svg' import { CreateCustomForm } from './CreateCustomForm' -export const Frontpage: React.FunctionComponent = () => { - const staticPresets = React.useMemo( - () => [ - { to: '/run/?seconds=60&flashOnZero', label: 'Countdown 1 minute' }, - { to: '/run/?seconds=120&flashOnZero', label: 'Countdown 2 minutes' }, - { to: '/run/?seconds=300&flashOnZero', label: 'Countdown 5 minutes' }, - { to: '/run/?seconds=600&flashOnZero', label: 'Countdown 10 minutes' }, - { to: '/run/?seconds=3600&flashOnZero', label: 'Countdown 60 minutes' }, - { - to: '/run/?seconds=86400&showHours&flashOnZero', - label: 'Countdown 1 day', - }, - ], - [], - ) - - const dynamicPresets = React.useMemo(() => ['1', '2', '3'], []) +const staticPresets = [ + { to: '/run/?seconds=60&flashOnZero', label: 'Countdown 1 minute' }, + { to: '/run/?seconds=120&flashOnZero', label: 'Countdown 2 minutes' }, + { to: '/run/?seconds=300&flashOnZero', label: 'Countdown 5 minutes' }, + { to: '/run/?seconds=600&flashOnZero', label: 'Countdown 10 minutes' }, + { to: '/run/?seconds=3600&flashOnZero', label: 'Countdown 60 minutes' }, + { + to: '/run/?seconds=86400&showHours&flashOnZero', + label: 'Countdown 1 day', + }, +] as const +const dynamicPresets = ['1', '2', '3'] as const +export const Frontpage: React.FunctionComponent = () => { const install = usePWAInstall() return (