-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathlayout.tsx
42 lines (40 loc) · 1.05 KB
/
layout.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
import React from "react";
const Layout = ({ children, bgColor }) => {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<title>Teju RSC</title>
<link rel="stylesheet" href="/main.css" />
</head>
<body
style={{
backgroundColor: bgColor,
color: bgColor === "black" ? "white" : "black",
transition: "all .3s ease",
}}
>
<header>
<span className="logo" key="span">
🐶
</span>
<a href="/list?test">RSC Thingy</a>
<div>
<input placeholder="Your name is..." type="text" />
<span>
<strong>Server time:</strong>{" "}
{Intl.DateTimeFormat("de-DE", {
hour12: true,
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
}).format(Date.now())}
</span>
</div>
</header>
<main>{children}</main>
</body>
</html>
);
};
export default Layout;