Skip to content

Commit

Permalink
cahnge bgcolor for entry page 💯
Browse files Browse the repository at this point in the history
  • Loading branch information
foxundermoon committed Mar 13, 2020
1 parent 9fa5d7c commit 25da89a
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions packages/website/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,40 @@ import { Container, Box, Typography } from '@material-ui/core';
import { useRouter } from 'next/router';
import { languageNames, localeNames, Locale } from '~/src/translations/config';
import Link from '~/src/Link';
import theme from '~/src/theme';

const Index: React.FC = () => {
const router = useRouter();
React.useEffect(() => {
const locale = getInitialLocale();
router.push('/[lang]/', `/${locale}/`);
// window.location.replace(`/${locale}`);
}, []);

return (
<>
<Head>
<meta name="robots" content="noindex, nofollow" />
</Head>
<Box bgcolor="grey.400" height="100vh">
<Box bgcolor={theme.palette.primary.main} minHeight="100vh">
<Container maxWidth="sm">
<Box pt={10} px={8} textAlign="center" color="grey.50">
<Fox />
<Typography variant="h6">Detecting language for you...</Typography>
<Typography variant="h1">WeFox</Typography>
<Typography variant="h5" color="error" component="noscript">
The current environment does not have a script environment, please select the language
manually
<Typography variant="h5" color="textPrimary" component="noscript">
The current environment is no script environment, manually select a language
</Typography>
</Box>
{localeNames.map(l => (
<Box textAlign="center" py={1}>
<Link variant="h5" key={l} lang={l} href={`/[lang]/`} as={`/${l}/`}>
<Link
variant="h5"
color="textPrimary"
key={l}
lang={l}
href={`/[lang]/`}
as={`/${l}/`}
>
{languageNames[l]}
</Link>
</Box>
Expand Down

1 comment on commit 25da89a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for website ready!

Built with commit 25da89a

https://home-website-ltaycj8be.now.sh

Please sign in to comment.