mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-11-02 01:15:31 +00:00
21 lines
452 B
TypeScript
21 lines
452 B
TypeScript
"use client";
|
|
|
|
import { useMountEffect } from "@/hooks/use-mount-effect";
|
|
|
|
import { useAppSidebarMode } from "./app-sidebar-mode-store";
|
|
import type { AppSidebarMode } from "./types";
|
|
|
|
interface AppSidebarModeSyncProps {
|
|
mode: AppSidebarMode;
|
|
}
|
|
|
|
export function AppSidebarModeSync({ mode }: AppSidebarModeSyncProps) {
|
|
const setMode = useAppSidebarMode((state) => state.setMode);
|
|
|
|
useMountEffect(() => {
|
|
setMode(mode);
|
|
});
|
|
|
|
return null;
|
|
}
|