-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
68 lines (61 loc) · 1.32 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import React from "react";
import styled from "styled-components";
import Image from "next/image";
import colors from "@/lib/colors";
import Link from "next/link";
import Logo from "@/components/universal/Logo";
import { MOBILE_BREAKPOINT } from "@/lib/constants";
const SafeHydrate = ({ children }) => {
return (
<div suppressHydrationWarning>
{typeof window === "undefined" ? null : children}
</div>
);
};
const TopBar = styled.div`
width: 100vw;
padding: 20px 20px;
display: flex;
flex-direction: row;
align-items: center;
`;
const Title = styled.h4`
font-size: 21px;
color: ${colors.white};
margin-left: 15px;
font-weight: 600;
`;
const Content = styled.div`
padding: 20px 20px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: absolute;
top: 60px;
left: 0;
bottom: 0;
right: 0;
`;
const Brand = styled.a`
text-decoration: none;
display: flex;
flex-direction: row;
align-items: center;
`;
const App: React.FC = (props) => {
return (
<SafeHydrate>
<TopBar>
<Link href="/" passHref>
<Brand>
<Logo size={30} />
<Title>likelist.xyz</Title>
</Brand>
</Link>
</TopBar>
<Content>{props.children}</Content>
</SafeHydrate>
);
};
export default App;