From 1951a339327133de65c672459edb8db0f8def438 Mon Sep 17 00:00:00 2001 From: Alec Ananian <1013230+alecananian@users.noreply.github.com> Date: Thu, 16 Nov 2023 17:33:04 -0800 Subject: [PATCH 1/3] add welcome card component --- ui/src/components/WelcomeCard.tsx | 33 +++++++++++++++++++++++++++++++ ui/src/nav/MobileRoot.tsx | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 ui/src/components/WelcomeCard.tsx diff --git a/ui/src/components/WelcomeCard.tsx b/ui/src/components/WelcomeCard.tsx new file mode 100644 index 0000000000..e0c6cc9d23 --- /dev/null +++ b/ui/src/components/WelcomeCard.tsx @@ -0,0 +1,33 @@ +import { useLocalStorage } from 'usehooks-ts'; + +import { createStorageKey } from '@/logic/utils'; + +export default function WelcomeCard() { + const [isWelcomeSeen, setIsWelcomeSeen] = useLocalStorage( + createStorageKey('welcome-seen'), + false + ); + + if (isWelcomeSeen) { + return null; + } + + return ( +
+

Welcome to Tlon

+

Tip 1 of 3

+

+ Visit the Tlon Studio group to learn more about what we're working + on now. +

+
+ + +
+
+ ); +} diff --git a/ui/src/nav/MobileRoot.tsx b/ui/src/nav/MobileRoot.tsx index 35802944c0..345ba4f41c 100644 --- a/ui/src/nav/MobileRoot.tsx +++ b/ui/src/nav/MobileRoot.tsx @@ -21,6 +21,7 @@ import Layout from '@/components/Layout/Layout'; import AddIconMobileNav from '@/components/icons/AddIconMobileNav'; import MagnifyingGlass16Icon from '@/components/icons/MagnifyingGlass16Icon'; import GroupJoinList from '@/groups/GroupJoinList'; +import WelcomeCard from '@/components/WelcomeCard'; export default function MobileRoot() { const [isScrolling, setIsScrolling] = useState(false); @@ -74,6 +75,7 @@ export default function MobileRoot() { } >