mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 13:25:18 +00:00
feat: button to hide welcome msg
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Card, CardDescription, CardTitle } from "@/components/ui/card"
|
||||
import { getSettings } from "@/data/settings"
|
||||
import { Banknote, ChartBarStacked, FolderOpenDot, Key, TextCursorInput } from "lucide-react"
|
||||
import { getSettings, updateSettings } from "@/data/settings"
|
||||
import { Banknote, ChartBarStacked, FolderOpenDot, Key, TextCursorInput, X } from "lucide-react"
|
||||
import { revalidatePath } from "next/cache"
|
||||
import Link from "next/link"
|
||||
|
||||
export async function WelcomeWidget() {
|
||||
@@ -11,7 +12,20 @@ export async function WelcomeWidget() {
|
||||
<Card className="flex flex-col md:flex-row items-start gap-10 p-10 w-full">
|
||||
<img src="/logo/1024.png" alt="Logo" className="w-64 h-64" />
|
||||
<div className="flex flex-col">
|
||||
<CardTitle className="text-2xl font-bold">Hey, I'm TaxHacker 👋</CardTitle>
|
||||
<CardTitle className="flex items-center justify-between">
|
||||
<span className="text-2xl font-bold">Hey, I'm TaxHacker 👋</span>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
onClick={async () => {
|
||||
"use server"
|
||||
await updateSettings("is_welcome_message_hidden", "true")
|
||||
revalidatePath("/")
|
||||
}}
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
</Button>
|
||||
</CardTitle>
|
||||
<CardDescription className="mt-5">
|
||||
<p className="mb-3">
|
||||
I'm a little accountant app that tries to help you deal with endless receipts, checks and invoices with (you
|
||||
|
||||
@@ -118,7 +118,7 @@ export function ExportTransactionsDialog({
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
{fields.map((field) => (
|
||||
<div key={field.code} className="inline-flex gap-2">
|
||||
<label className="flex gap-1">
|
||||
<label className="flex items-center gap-1">
|
||||
<input
|
||||
type="checkbox"
|
||||
name={field.code}
|
||||
|
||||
Reference in New Issue
Block a user