Skip to content

Commit d6cd57a

Browse files
committed
feat: added internal modal.
1 parent 18f88f9 commit d6cd57a

File tree

2 files changed

+104
-14
lines changed

2 files changed

+104
-14
lines changed

platforms/group-charter-manager/src/app/layout.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,29 @@ import { Inter } from "next/font/google";
33
import "./globals.css";
44
import { Toaster } from "@/components/ui/toaster";
55
import { AuthProvider } from "@/components/auth/auth-provider";
6+
import DisclaimerModal from "@/components/disclaimer-modal";
67

78
const inter = Inter({ subsets: ["latin"] });
89

910
export const metadata: Metadata = {
10-
title: "Group Charter Manager",
11-
description: "Manage your group charters and memberships",
11+
title: "Group Charter Manager",
12+
description: "Manage your group charters and memberships",
1213
};
1314

1415
export default function RootLayout({
15-
children,
16+
children,
1617
}: {
17-
children: React.ReactNode;
18+
children: React.ReactNode;
1819
}) {
19-
return (
20-
<html lang="en">
21-
<body className={inter.className}>
22-
<AuthProvider>
23-
{children}
24-
<Toaster />
25-
</AuthProvider>
26-
</body>
27-
</html>
28-
);
20+
return (
21+
<html lang="en">
22+
<body className={inter.className}>
23+
<AuthProvider>
24+
{children}
25+
<Toaster />
26+
<DisclaimerModal />
27+
</AuthProvider>
28+
</body>
29+
</html>
30+
);
2931
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
"use client";
2+
3+
import { Button } from "@/components/ui/button";
4+
import {
5+
Dialog,
6+
DialogContent,
7+
DialogHeader,
8+
DialogTitle,
9+
DialogDescription,
10+
DialogFooter,
11+
} from "@/components/ui/dialog";
12+
import { useState } from "react";
13+
import { useAuth } from "@/components/auth/auth-provider";
14+
15+
export default function DisclaimerModal() {
16+
const { logout } = useAuth();
17+
const [disclaimerAccepted, setDisclaimerAccepted] = useState(false);
18+
return (
19+
<>
20+
{!disclaimerAccepted ? (
21+
<Dialog open>
22+
<DialogContent
23+
className="max-w-lg mx-auto backdrop-blur-md p-6 rounded-lg"
24+
onInteractOutside={() => logout()}
25+
>
26+
<DialogHeader>
27+
<DialogTitle className="text-xl text-center font-bold">
28+
Disclaimer from MetaState Foundation
29+
</DialogTitle>
30+
<DialogDescription asChild>
31+
<div className="flex flex-col gap-2">
32+
<p className="font-bold">⚠️ Please note:</p>
33+
<p>
34+
Group Charter is a{" "}
35+
<b>functional prototype</b>, intended to
36+
showcase <b>interoperability</b> and
37+
core concepts of the W3DS ecosystem.
38+
</p>
39+
<p>
40+
<b>
41+
It is not a production-grade
42+
platform
43+
</b>{" "}
44+
and may lack full reliability,
45+
performance, and security guarantees.
46+
</p>
47+
<p>
48+
We <b>strongly recommend</b> that you
49+
avoid sharing{" "}
50+
<b>sensitive or private content</b>, and
51+
kindly ask for your understanding
52+
regarding any bugs, incomplete features,
53+
or unexpected behaviours.
54+
</p>
55+
<p>
56+
The app is still in development, so we
57+
kindly ask for your understanding
58+
regarding any potential issues. If you
59+
experience issues or have feedback, feel
60+
free to contact us at:
61+
</p>
62+
<a
63+
href="mailto:[email protected]"
64+
className="outline-none"
65+
>
66+
67+
</a>
68+
</div>
69+
</DialogDescription>
70+
</DialogHeader>
71+
<DialogFooter>
72+
<Button
73+
type="button"
74+
onClick={() => {
75+
setDisclaimerAccepted(true);
76+
}}
77+
>
78+
I Understand
79+
</Button>
80+
</DialogFooter>
81+
</DialogContent>
82+
</Dialog>
83+
) : (
84+
<></>
85+
)}
86+
</>
87+
);
88+
}

0 commit comments

Comments
 (0)