mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 14:11:13 -05:00
Refactor refresh button functionality
This commit is contained in:
@@ -5,7 +5,7 @@ import { ThemeToggle } from '@/components/theme/ThemeToggle';
|
||||
import { AuthButtons } from '@/components/auth/AuthButtons';
|
||||
import { useUserRole } from '@/hooks/useUserRole';
|
||||
|
||||
export function AdminHeader() {
|
||||
export function AdminHeader({ onRefresh }: { onRefresh?: () => void }) {
|
||||
const { permissions } = useUserRole();
|
||||
|
||||
return (
|
||||
@@ -33,7 +33,7 @@ export function AdminHeader() {
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() => window.location.reload()}
|
||||
onClick={onRefresh}
|
||||
title="Refresh admin data"
|
||||
>
|
||||
<RefreshCw className="w-4 h-4" />
|
||||
|
||||
Reference in New Issue
Block a user