- Unified localStorage key to 'theme-preference' across all components
- Fixed header.tsx using wrong localStorage key ('theme' instead of 'theme-preference')
- Added localStorage hybrid persistence for instant theme changes
- Removed router.refresh() which was causing stale data revert
- Replaced Blue theme with Sepia
- Consolidated auth() calls to prevent race conditions
- Updated UserSettingsData types to include all themes
30 lines
927 B
TypeScript
30 lines
927 B
TypeScript
import { getUsers } from '@/app/actions/admin'
|
|
import { CreateUserDialog } from '../create-user-dialog'
|
|
import { UserList } from '../user-list'
|
|
import { Plus } from 'lucide-react'
|
|
import { Button } from '@/components/ui/button'
|
|
|
|
export default async function AdminUsersPage() {
|
|
const users = await getUsers()
|
|
|
|
return (
|
|
<div className="space-y-6">
|
|
<div className="flex justify-between items-center">
|
|
<div>
|
|
<h1 className="text-3xl font-bold text-gray-900 dark:text-white">
|
|
Users
|
|
</h1>
|
|
<p className="text-gray-600 dark:text-gray-400 mt-1">
|
|
Manage application users and permissions
|
|
</p>
|
|
</div>
|
|
<CreateUserDialog />
|
|
</div>
|
|
|
|
<div className="bg-white dark:bg-zinc-900 rounded-lg shadow overflow-hidden border border-gray-200 dark:border-gray-800">
|
|
<UserList initialUsers={users} />
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|