fix baseurl local nav
This commit is contained in:
parent
4d75c90b4d
commit
ab9b40b1c4
|
|
@ -1,5 +1,8 @@
|
||||||
export const baseurl = (url: string) => {
|
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];
|
const id_site = location.pathname.split("/")[2];
|
||||||
|
|
||||||
if (url.startsWith("/")) return `/prod/${id_site}${url}`;
|
if (url.startsWith("/")) return `/prod/${id_site}${url}`;
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ export const overrideNav = (arg?: { local?: any }) => {
|
||||||
const pathname = newurl.pathname;
|
const pathname = newurl.pathname;
|
||||||
|
|
||||||
_href = baseurl(_href);
|
_href = baseurl(_href);
|
||||||
|
|
||||||
if (params) {
|
if (params) {
|
||||||
const prefix: LinkParam["prefix"] =
|
const prefix: LinkParam["prefix"] =
|
||||||
params.breads?.map((e) => {
|
params.breads?.map((e) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue