Skip to content

Commit 6472b44

Browse files
Fix sidebar overlap and add localization
Fixed sidebar overlap issue that appeared after styling. Ensured all pages have language support.
1 parent 1bcbc1f commit 6472b44

3 files changed

Lines changed: 23 additions & 9 deletions

File tree

src/components/AppSidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default function AppSidebar() {
8484
};
8585

8686
return (
87-
<Sidebar className={`border-r bg-gradient-to-b from-background to-muted/20 ${collapsed ? "w-16" : "w-72"}`}>
87+
<Sidebar className="border-r bg-gradient-to-b from-background to-muted/20" collapsible="icon">
8888
{/* Header */}
8989
<SidebarHeader className="border-b border-border/50 p-4">
9090
<div className="flex items-center gap-3">

src/contexts/LanguageContext.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ const translations = {
6363
'settings.purple': 'Mor',
6464
'settings.red': 'Kırmızı',
6565

66+
// Theme and Search
67+
'theme.light': 'Açık',
68+
'theme.dark': 'Koyu',
69+
'theme.system': 'Sistem',
70+
'search.placeholder': 'Ara...',
71+
6672
// Profile
6773
'profile.personalInfo': 'Kişisel Bilgiler',
6874
'profile.contactInfo': 'İletişim Bilgileri',
@@ -389,6 +395,12 @@ const translations = {
389395
'settings.purple': 'Purple',
390396
'settings.red': 'Red',
391397

398+
// Theme and Search
399+
'theme.light': 'Light',
400+
'theme.dark': 'Dark',
401+
'theme.system': 'System',
402+
'search.placeholder': 'Search...',
403+
392404
// Profile
393405
'profile.personalInfo': 'Personal Information',
394406
'profile.contactInfo': 'Contact Information',

src/layouts/AppLayout.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,21 @@ export default function AppLayout() {
7171
}
7272
};
7373

74+
const { t } = useLanguage();
75+
7476
return (
7577
<SidebarProvider>
7678
<Helmet>
7779
<title>React19 Admin – Modern React Admin Template</title>
7880
<meta name="description" content="Modern React admin template with dashboard, tables, forms and user management." />
7981
</Helmet>
8082

81-
<div className="min-h-screen flex w-full">
83+
<div className="flex min-h-screen w-full">
8284
<AppSidebar />
8385

84-
<div className="flex-1 flex min-h-screen flex-col">
85-
<header className="h-14 flex items-center gap-3 px-4 border-b bg-background/80 backdrop-blur supports-[backdrop-filter]:bg-background/60">
86-
<SidebarTrigger className="" />
86+
<div className="flex flex-1 flex-col">
87+
<header className="sticky top-0 z-50 h-14 flex items-center gap-3 px-4 border-b bg-background/80 backdrop-blur supports-[backdrop-filter]:bg-background/60">
88+
<SidebarTrigger />
8789
<div className="flex items-center gap-2 font-semibold">
8890
<span className="hidden sm:inline">React19 Admin</span>
8991
</div>
@@ -112,22 +114,22 @@ export default function AppLayout() {
112114
<SelectContent>
113115
<SelectItem value="light" className="flex items-center gap-2">
114116
<Sun className="h-4 w-4" />
115-
Açık
117+
{t('theme.light')}
116118
</SelectItem>
117119
<SelectItem value="dark" className="flex items-center gap-2">
118120
<Moon className="h-4 w-4" />
119-
Koyu
121+
{t('theme.dark')}
120122
</SelectItem>
121123
<SelectItem value="system" className="flex items-center gap-2">
122124
<Monitor className="h-4 w-4" />
123-
Sistem
125+
{t('theme.system')}
124126
</SelectItem>
125127
</SelectContent>
126128
</Select>
127129
</div>
128130

129131
<div className="hidden md:flex items-center">
130-
<Input placeholder="Ara..." className="w-64" />
132+
<Input placeholder={t('search.placeholder')} className="w-64" />
131133
</div>
132134

133135
<NotificationBell

0 commit comments

Comments
 (0)