feat: add admin and dashboard layouts with context for improved structure and functionality

This commit is contained in:
Ardeman
2025-02-23 10:11:47 +08:00
parent 2435f9a5d5
commit 8b1af335ec
10 changed files with 188 additions and 17 deletions
+5 -3
View File
@@ -1,15 +1,17 @@
import React, {
import {
createContext,
useState,
useContext,
type PropsWithChildren,
type Dispatch,
type SetStateAction,
} from 'react'
type NewsContextProperties = {
isLoginOpen: boolean
setIsLoginOpen: React.Dispatch<React.SetStateAction<boolean>>
setIsLoginOpen: Dispatch<SetStateAction<boolean>>
isRegisterOpen: boolean
setIsRegisterOpen: React.Dispatch<React.SetStateAction<boolean>>
setIsRegisterOpen: Dispatch<SetStateAction<boolean>>
}
const NewsContext = createContext<NewsContextProperties | undefined>(undefined)