diff --git a/package-lock.json b/package-lock.json index 737b6db..c044576 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "react": "^19.1.1", "react-dom": "^19.1.1", "react-icons": "^5.5.0", + "react-router-dom": "^7.9.4", "tailwind-variants": "^3.1.1", "tailwindcss": "^4.1.14" }, @@ -320,6 +321,7 @@ "cpu": [ "ppc64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -336,6 +338,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -352,6 +355,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -368,6 +372,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -384,6 +389,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -400,6 +406,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -416,6 +423,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -432,6 +440,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -448,6 +457,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -464,6 +474,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -480,6 +491,7 @@ "cpu": [ "ia32" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -496,6 +508,7 @@ "cpu": [ "loong64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -512,6 +525,7 @@ "cpu": [ "mips64el" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -528,6 +542,7 @@ "cpu": [ "ppc64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -544,6 +559,7 @@ "cpu": [ "riscv64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -560,6 +576,7 @@ "cpu": [ "s390x" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -576,6 +593,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -592,6 +610,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -608,6 +627,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -624,6 +644,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -640,6 +661,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -656,6 +678,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -672,6 +695,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -688,6 +712,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -704,6 +729,7 @@ "cpu": [ "ia32" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -720,6 +746,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1009,6 +1036,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1022,6 +1050,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1035,6 +1064,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1048,6 +1078,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1061,6 +1092,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1074,6 +1106,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1087,6 +1120,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1100,6 +1134,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1113,6 +1148,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1126,6 +1162,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1139,6 +1176,7 @@ "cpu": [ "loong64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1152,6 +1190,7 @@ "cpu": [ "ppc64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1165,6 +1204,7 @@ "cpu": [ "riscv64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1178,6 +1218,7 @@ "cpu": [ "riscv64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1191,6 +1232,7 @@ "cpu": [ "s390x" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1204,6 +1246,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1217,6 +1260,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1230,6 +1274,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1243,6 +1288,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1256,6 +1302,7 @@ "cpu": [ "ia32" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1269,6 +1316,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1282,6 +1330,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1599,6 +1648,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, "license": "MIT" }, "node_modules/@types/json-schema": { @@ -1903,6 +1953,15 @@ "dev": true, "license": "MIT" }, + "node_modules/cookie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -1983,6 +2042,7 @@ "version": "0.25.10", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.10.tgz", "integrity": "sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==", + "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -2262,6 +2322,7 @@ "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, "license": "MIT", "engines": { "node": ">=12.0.0" @@ -2344,6 +2405,7 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, @@ -2888,6 +2950,7 @@ "version": "3.3.11", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, "funding": [ { "type": "github", @@ -3013,12 +3076,14 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, "license": "ISC" }, "node_modules/picomatch": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -3031,6 +3096,7 @@ "version": "8.5.6", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "dev": true, "funding": [ { "type": "opencollective", @@ -3138,6 +3204,44 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.9.4.tgz", + "integrity": "sha512-SD3G8HKviFHg9xj7dNODUKDFgpG4xqD5nhyd0mYoB5iISepuZAvzSr8ywxgxKJ52yRzf/HWtVHc9AWwoTbljvA==", + "license": "MIT", + "dependencies": { + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-router-dom": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.9.4.tgz", + "integrity": "sha512-f30P6bIkmYvnHHa5Gcu65deIXoA2+r3Eb6PJIAddvsT9aGlchMatJ51GgpU470aSqRRbFX22T70yQNUGuW3DfA==", + "license": "MIT", + "dependencies": { + "react-router": "7.9.4" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -3152,6 +3256,7 @@ "version": "4.52.4", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.4.tgz", "integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==", + "dev": true, "license": "MIT", "dependencies": { "@types/estree": "1.0.8" @@ -3205,6 +3310,12 @@ "semver": "bin/semver.js" } }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "license": "MIT" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -3330,6 +3441,7 @@ "version": "0.2.15", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, "license": "MIT", "dependencies": { "fdir": "^6.5.0", @@ -3400,6 +3512,7 @@ "version": "7.1.9", "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.9.tgz", "integrity": "sha512-4nVGliEpxmhCL8DslSAUdxlB6+SMrhB0a1v5ijlh1xB1nEPuy1mxaHxysVucLHuWryAxLWg6a5ei+U4TLn/rFg==", + "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.25.0", diff --git a/package.json b/package.json index 05e8354..8a8aa94 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "react": "^19.1.1", "react-dom": "^19.1.1", "react-icons": "^5.5.0", + "react-router-dom": "^7.9.4", "tailwind-variants": "^3.1.1", "tailwindcss": "^4.1.14" }, diff --git a/src/App.jsx b/src/App.jsx index 186faab..d0eb072 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,11 +1,21 @@ -import './App.css'; +import { Outlet, useLocation } from 'react-router-dom'; +import Navbar from './components/Navbar'; +import Footer from './components/Footer'; function App() { + const location = useLocation(); + const { pathname } = location; + const hideNav = ['/login', '/signup', '/onboarding'].includes(pathname); + const showHomeNav = ['/'].includes(pathname); + const hideFooter = ['/login', '/signup', '/onboarding'].includes(pathname); + return ( -
-

- Mint Chips - Tailwind works! 🎉 -

+
+ {!hideNav && (showHomeNav ? : )} +
+ +
+ {!hideFooter &&
}
); } diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index e69de29..64ecc25 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -0,0 +1,9 @@ +function Footer() { + return ( +
+
Footer
+
+ ); +} + +export default Footer; diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index e69de29..6148b5e 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -0,0 +1,9 @@ +function Navbar() { + return ( +
+ +
+ ); +} + +export default Navbar; diff --git a/src/main.jsx b/src/main.jsx index d9cc93c..b6a2dfb 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -1,10 +1,38 @@ import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import './index.css'; -import App from './App.jsx'; +import { createBrowserRouter, RouterProvider } from 'react-router-dom'; +import Home from './pages/Home'; +import Onboarding from './pages/Onboarding'; +import Achievements from './pages/Achievements'; +import Community from './pages/Community'; +import Dashboard from './pages/Dashboard'; +import Error from './pages/Error'; +import Login from './pages/Login'; +import Signup from './pages/Signup'; +import App from './App'; +const router = createBrowserRouter([ + { + path: '/', + element: , + children: [ + { index: true, element: }, + { path: 'dashboard', element: }, + { path: 'community', element: }, + { path: 'signup', element: }, + { path: 'login', element: }, + { path: 'onboarding', element: }, + { path: 'achievements', element: }, + ], + }, + { + path: '*', + element: , + }, +]); createRoot(document.getElementById('root')).render( - + ); diff --git a/src/pages/Achievements.jsx b/src/pages/Achievements.jsx index e69de29..4b19094 100644 --- a/src/pages/Achievements.jsx +++ b/src/pages/Achievements.jsx @@ -0,0 +1,9 @@ +function Achievements() { + return ( +
+

Achievements! 🎉

+
+ ); +} + +export default Achievements; diff --git a/src/pages/Community.jsx b/src/pages/Community.jsx index e69de29..592f72d 100644 --- a/src/pages/Community.jsx +++ b/src/pages/Community.jsx @@ -0,0 +1,9 @@ +function Community() { + return ( +
+

Community Page! 🎉

+
+ ); +} + +export default Community; diff --git a/src/pages/Dashboard.jsx b/src/pages/Dashboard.jsx index e69de29..30c787d 100644 --- a/src/pages/Dashboard.jsx +++ b/src/pages/Dashboard.jsx @@ -0,0 +1,9 @@ +function Dashboard() { + return ( +
+

Dashboard Page! 🎉

+
+ ); +} + +export default Dashboard; diff --git a/src/pages/Error.jsx b/src/pages/Error.jsx index e69de29..b199d3e 100644 --- a/src/pages/Error.jsx +++ b/src/pages/Error.jsx @@ -0,0 +1,11 @@ +import { Link } from 'react-router-dom'; +function Error() { + return ( +
+

Error Page! 🎉

+ Return to Home Page +
+ ); +} + +export default Error; diff --git a/src/pages/Home.jsx b/src/pages/Home.jsx index e69de29..9fd6d34 100644 --- a/src/pages/Home.jsx +++ b/src/pages/Home.jsx @@ -0,0 +1,29 @@ +import { Link } from 'react-router-dom'; + +function Home() { + return ( +
+

Home Page! 🎉

+ + Achievements{' '} + + + Community{' '} + + + Dashboard{' '} + + + Login{' '} + + + Onboarding{' '} + + + Sign up{' '} + +
+ ); +} + +export default Home; diff --git a/src/pages/Login.jsx b/src/pages/Login.jsx index e69de29..f82b779 100644 --- a/src/pages/Login.jsx +++ b/src/pages/Login.jsx @@ -0,0 +1,9 @@ +function Login() { + return ( +
+

Login Page! 🎉

+
+ ); +} + +export default Login; diff --git a/src/pages/Onboarding.jsx b/src/pages/Onboarding.jsx index e69de29..32ba5ac 100644 --- a/src/pages/Onboarding.jsx +++ b/src/pages/Onboarding.jsx @@ -0,0 +1,9 @@ +function Onboarding() { + return ( +
+

Onboarding Page! 🎉

+
+ ); +} + +export default Onboarding; diff --git a/src/pages/Signup.jsx b/src/pages/Signup.jsx index e69de29..d1ea48c 100644 --- a/src/pages/Signup.jsx +++ b/src/pages/Signup.jsx @@ -0,0 +1,9 @@ +function Signup() { + return ( +
+

Sign up Page! 🎉

+
+ ); +} + +export default Signup;