fix:build
This commit is contained in:
parent
e18bbace7a
commit
01132d635c
|
|
@ -7,9 +7,9 @@ import "@/styles/globals.css";
|
|||
import clsx from "clsx";
|
||||
import { Metadata } from "next";
|
||||
import { Providers } from "./providers";
|
||||
import LoadScript from "@/utils/global";
|
||||
import { type ReactNode } from "react";
|
||||
import LoadTawk from "@/components/ui/tawkto/load-tawk";
|
||||
import LoadScript from "@/utils/loadsripct";
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
export const metadata: Metadata = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
"use client";
|
||||
import Cookies from "js-cookie";
|
||||
import { useEffect } from "react";
|
||||
import CryptoJS from "crypto-js";
|
||||
|
||||
export function convertDateFormat(dateString: string) {
|
||||
|
|
@ -72,26 +70,6 @@ export function formatTextToHtmlTag(text: string) {
|
|||
}
|
||||
}
|
||||
|
||||
const LoadScript = () => {
|
||||
useEffect(() => {
|
||||
const script = document.createElement("script");
|
||||
script.src = "https://cdn.userway.org/widget.js";
|
||||
script.setAttribute("data-account", "X36s1DpjqB");
|
||||
script.async = true;
|
||||
|
||||
document.head.appendChild(script);
|
||||
|
||||
return () => {
|
||||
// Cleanup if needed
|
||||
document.head.removeChild(script);
|
||||
};
|
||||
}, []);
|
||||
|
||||
return null; // Tidak perlu merender apa-apa
|
||||
};
|
||||
|
||||
export default LoadScript;
|
||||
|
||||
export function delay(ms: number) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
"use client";
|
||||
import { useEffect } from "react";
|
||||
|
||||
const LoadScript = () => {
|
||||
useEffect(() => {
|
||||
const script = document.createElement("script");
|
||||
script.src = "https://cdn.userway.org/widget.js";
|
||||
script.setAttribute("data-account", "X36s1DpjqB");
|
||||
script.async = true;
|
||||
|
||||
document.head.appendChild(script);
|
||||
|
||||
return () => {
|
||||
// Cleanup if needed
|
||||
document.head.removeChild(script);
|
||||
};
|
||||
}, []);
|
||||
|
||||
return null; // Tidak perlu merender apa-apa
|
||||
};
|
||||
|
||||
export default LoadScript;
|
||||
Loading…
Reference in New Issue