From 6382777341360a82f3842acd31857445108af30f Mon Sep 17 00:00:00 2001 From: dcodesdev <101001810+dcodesdev@users.noreply.github.com> Date: Tue, 6 May 2025 02:10:17 +0300 Subject: [PATCH 1/3] empty cards state --- apps/web/src/pages/dashboard/page.tsx | 136 ++++++++++++++------------ 1 file changed, 76 insertions(+), 60 deletions(-) diff --git a/apps/web/src/pages/dashboard/page.tsx b/apps/web/src/pages/dashboard/page.tsx index c186d15..5018b60 100644 --- a/apps/web/src/pages/dashboard/page.tsx +++ b/apps/web/src/pages/dashboard/page.tsx @@ -298,36 +298,46 @@ export function DashboardPage() {
- {Object.entries(dashboard.messageStats ?? {}).map( - ([status, count]) => { - const item = statusConfig[ - status as keyof typeof statusConfig - ] || { - icon: Mail, - className: "bg-muted text-muted-foreground", - } + {Object.keys(dashboard.messageStats ?? {}).length > 0 ? ( + Object.entries(dashboard.messageStats ?? {}).map( + ([status, count]) => { + const item = statusConfig[ + status as keyof typeof statusConfig + ] || { + icon: Mail, + className: "bg-muted text-muted-foreground", + } - const Icon = item.icon + const Icon = item.icon - return ( - - -
-
- -

{status}

+ return ( + + +
+
+ +

{status}

+
+
{count}
-
{count}
-
- - - ) - } + + + ) + } + ) + ) : ( +
+ No message status data available. +
)}
@@ -344,43 +354,49 @@ export function DashboardPage() {
- {dashboard.recentCampaigns.map((campaign) => ( - -
-
-

{campaign.title}

-

- Sent to {campaign.sentMessages.toLocaleString()}{" "} - subscribers -

-
-
-
-

- {campaign.deliveryRate.toFixed(1)}% -

-

- Delivery rate + {dashboard.recentCampaigns.length > 0 ? ( + dashboard.recentCampaigns.map((campaign) => ( + +

+
+

{campaign.title}

+

+ Sent to {campaign.sentMessages.toLocaleString()}{" "} + subscribers

-
-

- {dayjs(campaign.completedAt).format("DD MMM YYYY")} -

-

- Completed date -

+
+
+

+ {campaign.deliveryRate.toFixed(1)}% +

+

+ Delivery rate +

+
+
+

+ {dayjs(campaign.completedAt).format("DD MMM YYYY")} +

+

+ Completed date +

+
+
-
-
- - ))} + + )) + ) : ( +
+ No recent campaigns yet. Start one to see stats here. +
+ )}
From 7ec896e0e412df3da7f205cde492ecade012b969 Mon Sep 17 00:00:00 2001 From: dcodesdev <101001810+dcodesdev@users.noreply.github.com> Date: Tue, 6 May 2025 02:12:40 +0300 Subject: [PATCH 2/3] f --- RELEASE_NOTES.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 4c53426..c515b17 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,19 +1,11 @@ -# Release Notes - -## v0.3.0 - ### ✨ Features -- **Date Columns:** Display dates in a human readable format -- **Login Redirect:** Redirect to the dashboard if authenticated +- New features and improvements. ### 🐛 Bug Fixes -- Removed unnecessary columns -- API key last used date wasn't updating -- Zod bug fixed, downgraded to `3.24.4` -- Other bug fixes +- Various bug fixes and optimizations. ### 📚 Docs -Read the docs [here](https://docs.letterspace.app) for more information. +See the latest documentation at [https://docs.letterspace.app](https://docs.letterspace.app). From d9836bf5f276fc9ab22abe2d984d12328f94a1c7 Mon Sep 17 00:00:00 2001 From: dcodesdev <101001810+dcodesdev@users.noreply.github.com> Date: Tue, 6 May 2025 02:36:27 +0300 Subject: [PATCH 3/3] analytics --- apps/landing-page/src/app/layout.tsx | 2 ++ apps/landing-page/src/components/analytics.tsx | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 apps/landing-page/src/components/analytics.tsx diff --git a/apps/landing-page/src/app/layout.tsx b/apps/landing-page/src/app/layout.tsx index 7f42c33..677cd44 100644 --- a/apps/landing-page/src/app/layout.tsx +++ b/apps/landing-page/src/app/layout.tsx @@ -1,6 +1,7 @@ import type { Metadata } from "next" import { Geist, Geist_Mono } from "next/font/google" import "./globals.css" +import { Analytics } from "@/components/analytics" const geistSans = Geist({ variable: "--font-geist-sans", @@ -77,6 +78,7 @@ export default function RootLayout({ className={`${geistSans.variable} ${geistMono.variable} antialiased`} > {children} + ) diff --git a/apps/landing-page/src/components/analytics.tsx b/apps/landing-page/src/components/analytics.tsx new file mode 100644 index 0000000..89848f5 --- /dev/null +++ b/apps/landing-page/src/components/analytics.tsx @@ -0,0 +1,13 @@ +import Script from "next/script" + +export function Analytics() { + return ( +