- Add lucide-react for SVG icons throughout the admin - Redesign sidebar with gradient background, icons per nav item, and sticky layout - Redesign topbar with cleaner user info display - Redesign dashboard with icon-backed stat cards, gradient progress bars, activity feed - Update AdminNavLink with icon support and new active state styling - Improve table styling in admin-page CSS (rounded corners, hover, spacing) - Clean up unused admin CSS
37 lines
758 B
TypeScript
37 lines
758 B
TypeScript
"use client";
|
|
|
|
import type { ReactNode } from "react";
|
|
|
|
export function ConfirmAction({
|
|
message,
|
|
action,
|
|
userId,
|
|
className,
|
|
style,
|
|
children,
|
|
}: {
|
|
message: string;
|
|
action: string;
|
|
userId: number;
|
|
className?: string;
|
|
style?: React.CSSProperties;
|
|
children: ReactNode;
|
|
}) {
|
|
return (
|
|
<form action="/api/admin/users/actions" method="post" style={{ display: "inline-block" }}>
|
|
<input type="hidden" name="userId" value={userId} />
|
|
<input type="hidden" name="action" value={action} />
|
|
<button
|
|
type="submit"
|
|
className={className}
|
|
style={style}
|
|
onClick={(e) => {
|
|
if (!confirm(message)) e.preventDefault();
|
|
}}
|
|
>
|
|
{children}
|
|
</button>
|
|
</form>
|
|
);
|
|
}
|