Skip to content

Commit ff90ed9

Browse files
authored
fix(console): hide header Download button on localized download pages (#61207)
1 parent e764fbe commit ff90ed9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/console/app/src/component/header.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { Match, Show, Switch } from "solid-js"
1818
import { createStore } from "solid-js/store"
1919
import { createEffect, onCleanup } from "solid-js"
2020
import { config } from "~/config"
21+
import { strip } from "~/lib/language"
2122
import { useI18n } from "~/context/i18n"
2223
import { useLanguage } from "~/context/language"
2324
import "./header-context-menu.css"
@@ -40,7 +41,7 @@ export function Header() {
4041
const i18n = useI18n()
4142
const language = useLanguage()
4243
const location = useLocation()
43-
const onDownload = () => location.pathname.replace(/\/$/, "") === language.route("/download")
44+
const onDownload = () => strip(location.pathname) === "/download"
4445

4546
const [store, setStore] = createStore({
4647
mobileMenuOpen: false,

0 commit comments

Comments
 (0)