Skip to content

Commit

Permalink
update lang and url shop
Browse files Browse the repository at this point in the history
  • Loading branch information
ijash committed Jan 16, 2025
1 parent dfec57f commit 1f2251e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -90,4 +90,4 @@
"gh-pages": "^6.2.0",
"terser": "^5.37.0"
}
}
}
2 changes: 1 addition & 1 deletion src/components/common/goatCounter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
6 changes: 6 additions & 0 deletions src/components/header/languageDropdown.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/components/modal/productSearch/searchMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
{
Expand Down

0 comments on commit 1f2251e

Please sign in to comment.