solidjs / solid-start

SolidStart, the Solid app framework
https://start.solidjs.com
MIT License
4.93k stars 371 forks source link

[Bug?]: Incorrect classname active on the root page (active/inactive) #1502

Closed seahindeniz closed 1 month ago

seahindeniz commented 1 month ago

Duplicates

Latest version

Current behavior 😯

Home page's anchor component <A> class doesn't toggle inactive/active, but other pages does this.

Expected behavior 🤔

When switching to another route, inactive/active class must be toggled for home page

Steps to reproduce 🕹

Steps:

  1. Use the hackernews template/example
  2. pnpm dev and open in browser
  3. Switch between pages from the navigate bar

Video:

https://github.com/solidjs/solid-start/assets/5789670/cbb11c45-0faf-49b6-b9e4-c4a5681c6f96

Context 🔦

This will affect the class name based styling

Your environment 🌎

npx -y envinfo --system --binaries --managers

  System:
    OS: Windows 11 10.0.22000
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 7.52 GB / 23.89 GB
  Binaries:
    Node: 20.12.2 - C:\Program Files\nodejs\node.EXE
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.0.6 - ~\AppData\Local\pnpm\pnpm.EXE
  Managers:
    Cargo: 1.63.0 - ~\.cargo\bin\cargo.EXE
    pip3: 20.2.3 - C:\Python39\Scripts\pip3.EXE
ryansolid commented 1 month ago

Yeah it is because it isn't set to exact match thanks for pointing it out.