Skip to content

Commit

Permalink
🩹 Fix routing to maintain compatibility with old URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamel committed Jul 22, 2024
1 parent f313159 commit 099d95f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/App/Routing.elm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Page.Physics
import Page.SoundWaveToggle
import Page.Term
import Url exposing (Url)
import Url.Parser exposing (Parser, fragment, map, parse)
import Url.Parser exposing (Parser, fragment, map, oneOf, parse, s)


type Route
Expand All @@ -23,7 +23,10 @@ type Route

matchRoute : Parser (Route -> a) a
matchRoute =
map parseFragment (fragment identity)
oneOf
[ fragment parseFragment
, map Home (s "index.html") -- maintain compatibility with old urls
]


parseFragment : Maybe String -> Route
Expand Down

0 comments on commit 099d95f

Please sign in to comment.