fix baseurl local nav

This commit is contained in:
Rizky 2024-09-11 16:36:03 +07:00
parent 4d75c90b4d
commit ab9b40b1c4
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,8 @@
export const baseurl = (url: string) => {
if (location.hostname === "prasi.avolut.com") {
if (
location.hostname === "prasi.avolut.com" ||
location.host === "localhost:4550"
) {
const id_site = location.pathname.split("/")[2];
if (url.startsWith("/")) return `/prod/${id_site}${url}`;

View File

@ -21,6 +21,7 @@ export const overrideNav = (arg?: { local?: any }) => {
const pathname = newurl.pathname;
_href = baseurl(_href);
if (params) {
const prefix: LinkParam["prefix"] =
params.breads?.map((e) => {