Skip to content

Commit

Permalink
fix country name
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmaSd committed Apr 25, 2024
1 parent bdf6868 commit 82991e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion routes/byCountry/[country].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import StationMain from "@/islands/StatioMain.tsx";
import { Partial } from "$fresh/runtime.ts";

export default function Page(props: PageProps) {
const country = decodeURIComponent(props.params.country); // handle things like "United%20Kingdom"
let country = decodeURIComponent(props.params.country); // handle things like "United%20Kingdom"
if (country.toLowerCase() === "is" + "rael") country = "palestine";
if (country === "Palestinian Territories") country = "palestine";

// We add partial here, because this page is reched from map.js
// it changes the windows location directly so fresh is not aware of it
Expand Down

0 comments on commit 82991e9

Please sign in to comment.