Compare commits

..

2 Commits

Author SHA1 Message Date
caitlin 7a42e3c41c I fixed the runtime error that appeared.
I fixed the size error regarding both graphs.
2026-06-18 09:38:06 +02:00
caitlin f1a1db5ff6 This is the template for us to work on. 2026-06-17 17:35:54 +02:00
5 changed files with 19 additions and 52 deletions
+1 -39
View File
@@ -108,14 +108,12 @@
"node_modules/@emoji-mart/data": { "node_modules/@emoji-mart/data": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/@emoji-mart/data/-/data-1.2.1.tgz", "resolved": "https://registry.npmjs.org/@emoji-mart/data/-/data-1.2.1.tgz",
"integrity": "sha512-no2pQMWiBy6gpBEiqGeU77/bFejDqUTRY7KX+0+iur13op3bqUsXdnwoZs6Xb1zbv0gAj5VvS1PWoUUckSr5Dw==", "integrity": "sha512-no2pQMWiBy6gpBEiqGeU77/bFejDqUTRY7KX+0+iur13op3bqUsXdnwoZs6Xb1zbv0gAj5VvS1PWoUUckSr5Dw=="
"license": "MIT"
}, },
"node_modules/@emoji-mart/react": { "node_modules/@emoji-mart/react": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/@emoji-mart/react/-/react-1.1.1.tgz", "resolved": "https://registry.npmjs.org/@emoji-mart/react/-/react-1.1.1.tgz",
"integrity": "sha512-NMlFNeWgv1//uPsvLxvGQoIerPuVdXwK/EUek8OOkJ6wVOWPUizRBJU0hDqWZCOROVpfBgCemaC3m6jDOXi03g==", "integrity": "sha512-NMlFNeWgv1//uPsvLxvGQoIerPuVdXwK/EUek8OOkJ6wVOWPUizRBJU0hDqWZCOROVpfBgCemaC3m6jDOXi03g==",
"license": "MIT",
"peerDependencies": { "peerDependencies": {
"emoji-mart": "^5.2", "emoji-mart": "^5.2",
"react": "^16.8 || ^17 || ^18" "react": "^16.8 || ^17 || ^18"
@@ -441,9 +439,6 @@
"cpu": [ "cpu": [
"arm" "arm"
], ],
"libc": [
"glibc"
],
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@@ -460,9 +455,6 @@
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
"libc": [
"glibc"
],
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@@ -479,9 +471,6 @@
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
"libc": [
"glibc"
],
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@@ -498,9 +487,6 @@
"cpu": [ "cpu": [
"x64" "x64"
], ],
"libc": [
"glibc"
],
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@@ -517,9 +503,6 @@
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
"libc": [
"musl"
],
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@@ -536,9 +519,6 @@
"cpu": [ "cpu": [
"x64" "x64"
], ],
"libc": [
"musl"
],
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@@ -555,9 +535,6 @@
"cpu": [ "cpu": [
"arm" "arm"
], ],
"libc": [
"glibc"
],
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@@ -580,9 +557,6 @@
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
"libc": [
"glibc"
],
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@@ -605,9 +579,6 @@
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
"libc": [
"glibc"
],
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@@ -630,9 +601,6 @@
"cpu": [ "cpu": [
"x64" "x64"
], ],
"libc": [
"glibc"
],
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@@ -655,9 +623,6 @@
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
"libc": [
"musl"
],
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@@ -680,9 +645,6 @@
"cpu": [ "cpu": [
"x64" "x64"
], ],
"libc": [
"musl"
],
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@@ -51,15 +51,16 @@ export function LeadStatusChart({ data }: LeadStatusChartProps) {
initial={{ opacity: 0, y: 20 }} initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }} animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.3, delay: 0.2 }} transition={{ duration: 0.3, delay: 0.2 }}
className="h-full"
> >
<Card> <Card className="h-full">
<CardHeader> <CardHeader>
<CardTitle>Lead Status</CardTitle> <CardTitle>Lead Status</CardTitle>
</CardHeader> </CardHeader>
<CardContent> <CardContent className="flex flex-1 flex-col">
<div className="flex flex-col items-center"> <div className="flex flex-1 flex-col items-center justify-center">
{/* Donut */} {/* Donut */}
<svg width="280" height="280" viewBox="0 0 320 320" className="overflow-visible"> <svg width="100%" height="100%" viewBox="0 0 320 320" className="max-h-full overflow-visible" style={{ maxWidth: "280px" }}>
<defs> <defs>
{segs.map((s, i) => ( {segs.map((s, i) => (
<radialGradient key={i} id={`chart-grad-${i}`} cx="50%" cy="50%" r="50%"> <radialGradient key={i} id={`chart-grad-${i}`} cx="50%" cy="50%" r="50%">
@@ -22,8 +22,8 @@ export function LeadsPerMonthChart({ data }: LeadsPerMonthChartProps) {
const [hovered, setHovered] = useState<number | null>(null) const [hovered, setHovered] = useState<number | null>(null)
const width = 880 const width = 880
const height = 380 const height = 620
const padding = { top: 28, right: 24, bottom: 44, left: 44 } const padding = { top: 128, right: 24, bottom: 48, left: 44 }
const chartW = width - padding.left - padding.right const chartW = width - padding.left - padding.right
const chartH = height - padding.top - padding.bottom const chartH = height - padding.top - padding.bottom
@@ -55,8 +55,9 @@ export function LeadsPerMonthChart({ data }: LeadsPerMonthChartProps) {
initial={{ opacity: 0, y: 20 }} initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }} animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.3, delay: 0.3 }} transition={{ duration: 0.3, delay: 0.3 }}
className="h-full"
> >
<Card> <Card className="h-full">
<CardHeader> <CardHeader>
<div className="flex items-start justify-between"> <div className="flex items-start justify-between">
<div> <div>
@@ -77,12 +78,12 @@ export function LeadsPerMonthChart({ data }: LeadsPerMonthChartProps) {
</div> </div>
</div> </div>
</CardHeader> </CardHeader>
<CardContent> <CardContent className="flex flex-1 flex-col">
<div className="relative"> <div className="relative flex-1">
<svg <svg
viewBox={`0 0 ${width} ${height}`} viewBox={`0 0 ${width} ${height}`}
width="100%" width="100%"
height="auto" height="100%"
className="block overflow-visible" className="block overflow-visible"
> >
<defs> <defs>
+1 -1
View File
@@ -32,7 +32,7 @@ export function StatCard({ title, value, icon: Icon, variant = "default", descri
animate={{ opacity: 1, y: 0 }} animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.3, delay: index * 0.05 }} transition={{ duration: 0.3, delay: index * 0.05 }}
> >
<Card className="group hover:shadow-md transition-all duration-200"> <Card className="group hover:shadow-md transition-all duration-200 h-full">
<CardContent className="p-6"> <CardContent className="p-6">
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div className="space-y-1"> <div className="space-y-1">
+5 -2
View File
@@ -1,6 +1,6 @@
"use client" "use client"
import { useState } from "react" import { useState, useEffect } from "react"
import { useRouter } from "next/navigation" import { useRouter } from "next/navigation"
import { useTheme } from "next-themes" import { useTheme } from "next-themes"
import { cn } from "@/lib/utils" import { cn } from "@/lib/utils"
@@ -36,7 +36,10 @@ export function Topbar({ onMenuClick }: TopbarProps) {
const router = useRouter() const router = useRouter()
const { theme, setTheme } = useTheme() const { theme, setTheme } = useTheme()
const { user } = useUser() const { user } = useUser()
const [mounted, setMounted] = useState(false)
const [searchOpen, setSearchOpen] = useState(false) const [searchOpen, setSearchOpen] = useState(false)
useEffect(() => { setMounted(true) }, [])
const initials = user.name.split(" ").map((n) => n[0]).join("") const initials = user.name.split(" ").map((n) => n[0]).join("")
return ( return (
@@ -73,7 +76,7 @@ export function Topbar({ onMenuClick }: TopbarProps) {
onClick={() => setTheme(theme === "dark" ? "light" : "dark")} onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
className="text-muted-foreground" className="text-muted-foreground"
> >
{theme === "dark" ? <Sun className="h-5 w-5" /> : <Moon className="h-5 w-5" />} {mounted ? (theme === "dark" ? <Sun className="h-5 w-5" /> : <Moon className="h-5 w-5" />) : <div className="h-5 w-5" />}
</Button> </Button>
{/* Notifications */} {/* Notifications */}