From 11926be7f66881c9156d2e3d61c24a75ec34313d Mon Sep 17 00:00:00 2001 From: Riley Date: Sat, 27 Jun 2026 06:55:11 +0000 Subject: [PATCH 1/3] Update license year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 3bdf0a1..c9c5515 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Coders for Causes +Copyright (c) 2026 Coders for Causes Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From e5b28c859d92f94ea1eb149f0c4f7f4439cd3df8 Mon Sep 17 00:00:00 2001 From: Games4Doritos Date: Sat, 18 Jul 2026 12:18:01 +0800 Subject: [PATCH 2/3] Migrate to app router - Removed the pages files and added the app directory instead, containing a base page.tsx (landing page) and layout.tsx. - Created a Providers component for the QueryClientProvider and ReactQueryTools --- client/src/app/layout.tsx | 29 ++++++++++++++++++++ client/src/{pages/index.tsx => app/page.tsx} | 2 ++ client/src/components/main/providers.tsx | 23 ++++++++++++++++ client/src/pages/_app.tsx | 16 ----------- client/src/pages/_document.tsx | 13 --------- client/tsconfig.json | 28 +++++++++++++++---- 6 files changed, 77 insertions(+), 34 deletions(-) create mode 100644 client/src/app/layout.tsx rename client/src/{pages/index.tsx => app/page.tsx} (98%) create mode 100644 client/src/components/main/providers.tsx delete mode 100644 client/src/pages/_app.tsx delete mode 100644 client/src/pages/_document.tsx diff --git a/client/src/app/layout.tsx b/client/src/app/layout.tsx new file mode 100644 index 0000000..5fd1d69 --- /dev/null +++ b/client/src/app/layout.tsx @@ -0,0 +1,29 @@ +import "@/styles/globals.css"; + +import type { Metadata } from "next"; +import { Inter } from "next/font/google"; + +import Providers from "@/components/main/providers"; + +export const metadata: Metadata = { + title: "Electrify Everything WA", + description: "Home Page", +}; + +const inter = Inter({ subsets: ["latin"], variable: "--font-inter" }); + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + +
+ {children} +
+ + + ); +} diff --git a/client/src/pages/index.tsx b/client/src/app/page.tsx similarity index 98% rename from client/src/pages/index.tsx rename to client/src/app/page.tsx index c051281..c53b5ef 100644 --- a/client/src/pages/index.tsx +++ b/client/src/app/page.tsx @@ -1,3 +1,5 @@ +"use client"; + import { Inter as FontSans } from "next/font/google"; import { useState } from "react"; diff --git a/client/src/components/main/providers.tsx b/client/src/components/main/providers.tsx new file mode 100644 index 0000000..2a5fcca --- /dev/null +++ b/client/src/components/main/providers.tsx @@ -0,0 +1,23 @@ +"use client"; + +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; +import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; +import { useState } from "react"; + +export default function Providers({ children }: { children: React.ReactNode }) { + /*const [queryClient] = useState(() => new QueryClient({ + defaultOptions: { + queries: { + staleTime: 60 * 1000, // 1 minute + }, + }, + }))*/ + const [queryClient] = useState(() => new QueryClient()); + + return ( + + + {children} + + ); +} diff --git a/client/src/pages/_app.tsx b/client/src/pages/_app.tsx deleted file mode 100644 index 628e9f2..0000000 --- a/client/src/pages/_app.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import "@/styles/globals.css"; - -import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; -import type { AppProps } from "next/app"; - -const queryClient = new QueryClient(); - -export default function App({ Component, pageProps }: AppProps) { - return ( - - - - - ); -} diff --git a/client/src/pages/_document.tsx b/client/src/pages/_document.tsx deleted file mode 100644 index ffc3f3c..0000000 --- a/client/src/pages/_document.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { Head, Html, Main, NextScript } from "next/document"; - -export default function Document() { - return ( - - - -
- - - - ); -} diff --git a/client/tsconfig.json b/client/tsconfig.json index 5845367..667307b 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -1,6 +1,10 @@ { "compilerOptions": { - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -13,10 +17,24 @@ "jsx": "preserve", "incremental": true, "paths": { - "@/*": ["./src/*"] + "@/*": [ + "./src/*" + ] }, - "target": "ES2017" + "target": "ES2017", + "plugins": [ + { + "name": "next" + } + ] }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"] + "include": [ + "**/*.ts", + "**/*.tsx", + "next-env.d.ts", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] } From 202967d1dc98252c115e1a1c99bf43ad567c90a3 Mon Sep 17 00:00:00 2001 From: Games4Doritos Date: Sat, 18 Jul 2026 12:25:55 +0800 Subject: [PATCH 3/3] Make navbar a client component --- client/src/components/ui/Navbar.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/components/ui/Navbar.tsx b/client/src/components/ui/Navbar.tsx index 4839762..0c86ff3 100644 --- a/client/src/components/ui/Navbar.tsx +++ b/client/src/components/ui/Navbar.tsx @@ -1,3 +1,4 @@ +"use client"; import { ChevronDown, ChevronRight, Menu } from "lucide-react"; import Image from "next/image"; import Link from "next/link";