Aidan 56603e7e99
All checks were successful
Build and Push Nightly CI Image / build_and_push (push) Successful in 1m47s
Build and Push Docker Image / build_and_push (push) Successful in 3s
i don't even know at this point (3 billion changes to build the first release)
2025-02-16 15:28:17 -05:00

45 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React, { useState, useEffect } from "react";
import Cookies from "js-cookie";
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
import { Button } from "@/components/ui/button";
import { Check } from "lucide-react";
export const WelcomeCard = () => {
const [visible, setVisible] = useState(true);
useEffect(() => {
const isRead = Cookies.get("welcome-read");
if (isRead === "true") {
setVisible(false);
}
}, []);
const handleMarkAsRead = () => {
Cookies.set("welcome-read", "true");
setVisible(false);
};
if (!visible) return null;
return (
<Card className="col-span-full md:col-span-1">
<CardHeader>
<CardTitle>Welcome to your dashboard</CardTitle>
</CardHeader>
<CardContent>
<p className="text-sm">
Thanks for logging in! Here you can manage your account and the services available to you.
</p>
<p className="text-sm mt-4">
Were thrilled to have you on board, and if you need <i>anything</i>, dont hesitate to contact support (see the sidebar).
</p>
<p className="text-sm mt-4">Thats all, have a great day!</p>
</CardContent>
<CardFooter>
<Button className="w-full" onClick={handleMarkAsRead}>
<Check /> Mark as Read
</Button>
</CardFooter>
</Card>
);
};