import { createFileRoute } from "@tanstack/react-router";
import z from "zod";
import { useSession } from "../lib/auth-client";
import { trackLstEvent } from "../lib/umami.utils";
export const Route = createFileRoute("/")({
validateSearch: z.object({
redirect: z.string().optional(),
}),
component: Index,
});
function Index() {
const { isPending } = useSession();
if (isPending)
return
Loading...
;
// if (!session) return Sign In
let url: string;
if (window.location.origin.includes("localhost")) {
url = `https://www.youtube.com/watch?v=dQw4w9WgXcQ`;
} else if (window.location.origin.includes("vms006")) {
url = `https://${window.location.hostname.replace("vms006", "prod.alpla.net/")}lst/app/old/ocp`;
} else {
url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
}
//test tracking
const click = () => {
trackLstEvent("silly_click", {
module: "silly",
action: "click",
label: "rick rolled",
page: window.location.pathname,
});
};
// const checkConfig = () => {
// console.log(runtimeConfig);
// trackLstEvent("config_click", {
// module: "app",
// action: "click",
// label: "configCheck",
// page: window.location.pathname,
// });
// };
return (
Welcome Lst - V3
This is active in your plant today due to having warehousing activated
and new functions needed to be introduced, you should be still using LST
as you were before.
If you dont know why you are here and looking for One Click Print{" "}
Click
{" "}
Here
{/* {session && session.user.role === "systemAdmin" && (
Check config
)} */}
);
}