diff --git a/package.json b/package.json index 1afbcb7..f6135cc 100644 --- a/package.json +++ b/package.json @@ -55,9 +55,9 @@ "dev": "react-scripts start", "start": "react-scripts start", "obfuscate": "find build/static/js -type f -name 'main.*.js' -print0 | xargs -0 -I {} terser {} --compress --mangle --output {}", - "build": "GENERATE_SOURCEMAP=false react-scripts build && npm run obfuscate", "test": "react-scripts test", "eject": "react-scripts eject", + "build": "GENERATE_SOURCEMAP=false react-scripts build && npm run obfuscate", "deploy": "npm run build && gh-pages -d build" }, "eslintConfig": { @@ -90,4 +90,4 @@ "gh-pages": "^6.2.0", "terser": "^5.37.0" } -} +} \ No newline at end of file diff --git a/src/components/common/goatCounter.tsx b/src/components/common/goatCounter.tsx index 79497fb..2da1c9e 100644 --- a/src/components/common/goatCounter.tsx +++ b/src/components/common/goatCounter.tsx @@ -7,7 +7,7 @@ const GoatCounter: React.FC = () => { script.src = "//gc.zgo.at/count.js"; script.async = true; - if (process.env.GOAT_COUNTER_ID) { + if (process.env.REACT_APP_GOAT_COUNTER_ID) { script.dataset.goatcounter = `https://${process.env.REACT_APP_GOAT_COUNTER_ID}.goatcounter.com/count`; } else { console.error("GOAT_COUNTER_ID is not defined"); diff --git a/src/components/header/languageDropdown.tsx b/src/components/header/languageDropdown.tsx index 123e8e0..2d0b03b 100644 --- a/src/components/header/languageDropdown.tsx +++ b/src/components/header/languageDropdown.tsx @@ -1,11 +1,17 @@ import { IconLanguage } from "components/common"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; export default function LanguageDropdown() { const { i18n } = useTranslation("global"); + useEffect(() => { + document.documentElement.lang = i18n.language; + }, [i18n.language]); + function changeLanguage(lang: string) { i18n.changeLanguage(lang); + document.documentElement.lang = lang; } return ( diff --git a/src/components/modal/productSearch/searchMethods.ts b/src/components/modal/productSearch/searchMethods.ts index be91d46..601eac3 100644 --- a/src/components/modal/productSearch/searchMethods.ts +++ b/src/components/modal/productSearch/searchMethods.ts @@ -30,7 +30,7 @@ export function getSearchMethods(d: DataRepresentation): IFindProductProps[] { id: "sindoSealTokped", icon: iconTokped, name: "Sindo Seal - Tokopedia", - url: `https://www.tokopedia.com/sindoseal/product?q=oring%20${d.code}`, + url: `https://www.tokopedia.com/sindoseal?q=oring%20${d.code}`, region: "id", }, {