This commit is contained in:
rizky 2024-08-09 00:57:19 -07:00
parent 09c3eb5e9a
commit 358b0bbb57
3 changed files with 10 additions and 1 deletions

View File

@ -114,7 +114,8 @@ export { Button, FloatButton } from "@/comps/ui/button";
export { FormatValue } from "@/utils/format-value";
export { GetValue } from "@/utils/get-value";
export { password } from "@/utils/password";
export { call_prasi_events, prasi_events } from "lib/utils/prasi-events";
export { prasi_events, call_prasi_events } from "lib/utils/prasi-events";
export { baseurl } from "@/utils/baseurl";
/** Session */
export { Login } from "@/preset/login/Login";

7
utils/baseurl.ts Executable file
View File

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

1
utils/globals.d.ts vendored
View File

@ -16,3 +16,4 @@ declare var navigate: (
}
) => void;
declare var siteurl: (path: string) => string;
declare var baseurl: (path: string) => string;