Add scheduleregdww5sudfw side ddd

This commit is contained in:
yznahmad 2025-06-20 06:14:30 +03:00
parent 56fa3dddaa
commit 9f0af875f6

View File

@ -23,7 +23,12 @@ export default function Sidebar () {
// get states
const sidebarState = useAppSelector((state) => state.sidebarReducer.value.state);
const sidebarItems = useAppSelector((state) => state.sidebarReducer.value.items);
const appGeneralSettings = useAppSelector((state) => state.settingsReducer.value.appGeneralSettings)
const appGeneralSettings = useAppSelector((state) => state.settingsReducer.value.appGeneralSettings) || {
showLogo: true,
logo: '',
appName: '',
appNameEN: ''
};
// handle sidebar menus states
const [currentMenu, setCurrentMenu] = useState<string>('');
const toggleMenu = (value: string) => {
@ -43,8 +48,13 @@ export default function Sidebar () {
<nav className={`fixed top-0 ltr:left-0 rtl:right-0 lg:relative shadow-[5px_0_25px_0_rgba(94,92,154,0.1)] z-[99] h-screen bg-primary-dark dark:bg-primary-dark duration-300 ${sidebarState ? 'min-w-[260px] max-w-[260px] ' : 'ltr:translate-x-[-260px] rtl:translate-x-[260px] w-0'}`}>
<header className="w-full max-h-[64px] flex justify-between items-center px-[18px] py-[14px] [&_*]:text-text-light bg-secondary-dark">
<div className="flex justify-center items-center flex gap-[15px]">
<div className={`w-12 h-16 flex items-center justify-center relative ${appGeneralSettings.showLogo ? '' : 'hidden'}`} dangerouslySetInnerHTML={{ __html: appGeneralSettings.logo }} />
<h1 className="text-[25px] font-light">{local == 'ar' ? appGeneralSettings.appName : appGeneralSettings.appNameEN}</h1>
{appGeneralSettings?.showLogo && appGeneralSettings?.logo && (
<div className="w-12 h-16 flex items-center justify-center relative"
dangerouslySetInnerHTML={{ __html: appGeneralSettings.logo }} />
)}
<h1 className="text-[25px] font-light">
{local === 'ar' ? (appGeneralSettings?.appName || '') : (appGeneralSettings?.appNameEN || '')}
</h1>
</div>
<button onClick={() => {dispatch(toggleSidebar())}} className="rounded-full rtl:rotate-180 hover:bg-primary/5 p-[6px]">
<svg width="23" height="23" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">