mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-16 13:05:14 +03:00
fix(console): hide header Download button on localized download pages (#61207)
This commit is contained in:
@@ -18,6 +18,7 @@ import { Match, Show, Switch } from "solid-js"
|
||||
import { createStore } from "solid-js/store"
|
||||
import { createEffect, onCleanup } from "solid-js"
|
||||
import { config } from "~/config"
|
||||
import { strip } from "~/lib/language"
|
||||
import { useI18n } from "~/context/i18n"
|
||||
import { useLanguage } from "~/context/language"
|
||||
import "./header-context-menu.css"
|
||||
@@ -40,7 +41,7 @@ export function Header() {
|
||||
const i18n = useI18n()
|
||||
const language = useLanguage()
|
||||
const location = useLocation()
|
||||
const onDownload = () => location.pathname.replace(/\/$/, "") === language.route("/download")
|
||||
const onDownload = () => strip(location.pathname) === "/download"
|
||||
|
||||
const [store, setStore] = createStore({
|
||||
mobileMenuOpen: false,
|
||||
|
||||
Reference in New Issue
Block a user