forked from basetool-io/basetool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPublicLayout.tsx
50 lines (45 loc) · 1.53 KB
/
PublicLayout.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
// import { inProduction } from "@/lib/environment";
// import { intercomAppId } from "@/lib/services"
// import { useIntercom } from "react-use-intercom";
// import { useSession } from "next-auth/client";
import HeadSection from "./HeadSection";
import React, { ReactNode } from "react";
import classNames from "classnames";
function Layout({ children }: { children: ReactNode }) {
// const [session, sessionIsLoading] = useSession();
// const { boot, update } = useIntercom();
// useEffect(() => {
// // Boot up the Intercom widget
// if (inProduction && intercomAppId) boot();
// }, []);
// useEffect(() => {
// // Update Intercom with the user's info
// if (inProduction && !sessionIsLoading && session && intercomAppId) {
// update({
// name: session?.user?.name,
// email: session?.user?.email,
// createdAt: session?.user?.createdAt?.toString(),
// userHash: session?.user?.intercomUserHash,
// });
// }
// }, [sessionIsLoading, session]);
return (
<>
<HeadSection />
<div className="flex w-screen h-screen">
<div
className={classNames(
"flex-1 flex bg-cool-gray-100 rounded-lg shadow w-[calc(100%-1rem)] h-[calc(100%-1rem)] m-2"
)}
>
<div className="flex-1 flex flex-col w-full h-full overflow-auto">
<div className="relative flex flex-1 w-full max-h-full">
{children}
</div>
</div>
</div>
</div>
</>
);
}
export default Layout;