17 lines
421 B
TypeScript
17 lines
421 B
TypeScript
"use client";
|
|
|
|
import { usePathname } from "next/navigation";
|
|
import KeepOnline from "@/components/KeepOnline";
|
|
|
|
const KeepOnlineWrapper = () => {
|
|
const pathname = usePathname();
|
|
|
|
// Don't show KeepOnline on admin pages or non-dashboard pages
|
|
if (!pathname?.includes("/dashboard") || pathname?.includes("/dashboard/admin")) {
|
|
return null;
|
|
}
|
|
|
|
return <KeepOnline />;
|
|
};
|
|
|
|
export default KeepOnlineWrapper;
|