Skip to content

Commit 55f6b35

Browse files
add minimal star reminder
1 parent 1fce0d2 commit 55f6b35

File tree

5 files changed

+38
-1
lines changed

5 files changed

+38
-1
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@
3636
"lucide-react": "^0.468.0",
3737
"mermaid": "^11.4.1",
3838
"next": "^15.0.1",
39+
"next-themes": "^0.4.6",
3940
"postgres": "^3.4.4",
4041
"posthog-js": "^1.203.1",
4142
"react": "^18.3.1",
4243
"react-dom": "^18.3.1",
4344
"react-icons": "^5.4.0",
45+
"sonner": "^2.0.3",
4446
"svg-pan-zoom": "^3.6.2",
4547
"tailwind-merge": "^2.5.5",
4648
"tailwindcss-animate": "^1.0.7",

pnpm-lock.yaml

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/[username]/[repo]/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ import { useDiagram } from "~/hooks/useDiagram";
88
import { ApiKeyDialog } from "~/components/api-key-dialog";
99
import { ApiKeyButton } from "~/components/api-key-button";
1010
import { useState } from "react";
11+
import { useStarReminder } from "~/hooks/useStarReminder";
1112

1213
export default function Repo() {
1314
const [zoomingEnabled, setZoomingEnabled] = useState(false);
1415
const params = useParams<{ username: string; repo: string }>();
16+
17+
// Use the star reminder hook
18+
useStarReminder();
19+
1520
const {
1621
diagram,
1722
error,

src/app/layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { type Metadata } from "next";
55
import { Header } from "~/components/header";
66
import { Footer } from "~/components/footer";
77
import { CSPostHogProvider } from "./providers";
8+
import { Toaster } from "~/components/ui/sonner";
89

910
export const metadata: Metadata = {
1011
title: "GitDiagram",
@@ -81,6 +82,7 @@ export default function RootLayout({
8182
<Header />
8283
<main className="flex-grow">{children}</main>
8384
<Footer />
85+
<Toaster />
8486
</body>
8587
</CSPostHogProvider>
8688
</html>

src/components/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function Header() {
1818
}, []);
1919

2020
const formatStarCount = (count: number | null) => {
21-
if (!count) return "3.0k"; // Default to 2.0k if count is null (it can only go up from here)
21+
if (!count) return "6.0k"; // Default to 2.0k if count is null (it can only go up from here)
2222
if (count >= 1000) {
2323
return `${(count / 1000).toFixed(1)}k`;
2424
}

0 commit comments

Comments
 (0)