fix: navbar selected link

This commit is contained in:
TrèsAbhi committed 2024-09-23 10:19:11 -05:00
1 parent a54ba78dbf
commit 53c0f48437
4 files changed
+10 -11

No files matched your search

BIN
View File
Binary file not shown.
+6 -6
View File
@@ -4,7 +4,7 @@
"scripts": { "scripts": {
"dev": "astro dev", "dev": "astro dev",
"start": "astro dev", "start": "astro dev",
"build": "astro check && astro build", "build": "astro build",
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
@@ -16,18 +16,18 @@
"@nanostores/react": "^0.7.3", "@nanostores/react": "^0.7.3",
"@radix-ui/react-icons": "^1.3.0", "@radix-ui/react-icons": "^1.3.0",
"@radix-ui/themes": "^3.1.3", "@radix-ui/themes": "^3.1.3",
"@vanilla-extract/css": "^1.15.5",
"astro": "^4.15.6",
"three": "0.159.0",
"@react-three/drei": "^9.111.5", "@react-three/drei": "^9.111.5",
"@react-three/fiber": "^8.17.6", "@react-three/fiber": "^8.17.6",
"@vanilla-extract/css": "^1.15.5",
"astro": "^4.15.6",
"astro-purgecss": "^4.6.0", "astro-purgecss": "^4.6.0",
"nanostores": "^0.11.3", "nanostores": "^0.11.3",
"purgecss": "^6.0.0", "purgecss": "^6.0.0",
"react": "^18.3.1", "react": "^18.3.1",
"zustand": "^4.5.5",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-promise-suspense": "^0.3.4" "react-promise-suspense": "^0.3.4",
"three": "0.159.0",
"zustand": "^4.5.5"
}, },
"devDependencies": { "devDependencies": {
"@types/three": "^0.160.0", "@types/three": "^0.160.0",
+3 -4
View File
@@ -142,10 +142,9 @@ const isBranchNamed =
(branch) => (branch) =>
branch !== assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH), branch !== assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH),
); );
// const selected = window.location.pathname.startsWith( const selected = Astro.url.pathname.startsWith(
// `/tools/${tool.id}`, `/tools/${tool.id}`,
// ); );
const selected = false;
if (unavailableOnBranch) return null; if (unavailableOnBranch) return null;
@@ -4,8 +4,8 @@ import { BlitzKitTheme } from '../components/BlitzKitTheme';
import Footer from '../components/Footer.astro'; import Footer from '../components/Footer.astro';
import Navbar from '../components/Navbar.astro'; import Navbar from '../components/Navbar.astro';
import Party3 from '../components/Party3.astro'; import Party3 from '../components/Party3.astro';
const { pathname } = Astro.url;
const { pathname } = Astro.url;
const isRoot = pathname === '/'; const isRoot = pathname === '/';
--- ---