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 diff --git a/client/src/app/layout.tsx b/client/src/app/layout.tsx new file mode 100644 index 0000000..602b8e8 --- /dev/null +++ b/client/src/app/layout.tsx @@ -0,0 +1,37 @@ +import "@/styles/globals.css"; + +import type { Metadata } from "next"; +import { Montserrat } from "next/font/google"; + +import Providers from "@/components/main/providers"; +import Navbar from "@/components/ui/Navbar"; + +export const metadata: Metadata = { + title: "Electrify Everything WA", + description: "Home Page", +}; + +const montserrat = Montserrat({ + subsets: ["latin"], + variable: "--font-sans", + weight: ["400", "500", "600", "700", "800"], +}); + +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/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"; diff --git a/client/src/pages/_app.tsx b/client/src/pages/_app.tsx deleted file mode 100644 index 2e0972c..0000000 --- a/client/src/pages/_app.tsx +++ /dev/null @@ -1,27 +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"; -import { Montserrat } from "next/font/google"; - -import Navbar from "@/components/ui/Navbar"; - -const montserrat = Montserrat({ - subsets: ["latin"], - variable: "--font-sans", - weight: ["400", "500", "600", "700", "800"], -}); - -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 390f9d8..5572ae0 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -14,20 +14,26 @@ "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "react-jsx", + "jsx": "preserve", "incremental": true, "paths": { "@/*": [ "./src/*" ] }, - "target": "ES2017" + "target": "ES2017", + "plugins": [ + { + "name": "next" + } + ] }, "include": [ - "next-env.d.ts", + "**/*.d.ts", "**/*.ts", "**/*.tsx", - "**/*.d.ts" + "next-env.d.ts", + ".next/types/**/*.ts" ], "exclude": [ "node_modules"