forked from Cveinnt/LiveTerm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_app.tsx
35 lines (30 loc) · 849 Bytes
/
_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
import React from 'react';
import '../styles/global.css';
import Head from 'next/head';
const App = ({ Component, pageProps }) => {
const inputRef = React.useRef<HTMLInputElement>(null);
const onClickAnywhere = () => {
inputRef.current.focus();
};
return (
<>
<Head>
<meta
name="viewport"
content="initial-scale=1.0, width=device-width"
key="viewport"
maximum-scale="1"
/>
</Head>
<div
className="text-light-foreground dark:text-dark-foreground min-w-max text-xs md:min-w-full md:text-base"
onClick={onClickAnywhere}
>
<main className="bg-light-background dark:bg-dark-background w-full h-full p-2">
<Component {...pageProps} inputRef={inputRef} />
</main>
</div>
</>
);
};
export default App;