mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 07:31:14 -05:00
Improve component stability and user experience with safety checks
Implement robust error handling, safety checks for data structures, and state management improvements across various components to prevent runtime errors and enhance user experience. Replit-Commit-Author: Agent Replit-Commit-Session-Id: a71e826a-1d38-4b6e-a34f-fbf5ba1f1b25 Replit-Commit-Checkpoint-Type: intermediate_checkpoint
This commit is contained in:
13
src/components/ui/sidebar-context.ts
Normal file
13
src/components/ui/sidebar-context.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { createContext } from "react";
|
||||
|
||||
export type SidebarContext = {
|
||||
state: "expanded" | "collapsed";
|
||||
open: boolean;
|
||||
setOpen: (open: boolean) => void;
|
||||
openMobile: boolean;
|
||||
setOpenMobile: (open: boolean) => void;
|
||||
isMobile: boolean;
|
||||
toggleSidebar: () => void;
|
||||
};
|
||||
|
||||
export const SidebarContext = createContext<SidebarContext | null>(null);
|
||||
Reference in New Issue
Block a user