mirror of
https://github.com/Hackdex-App/hackdex-website.git
synced 2026-09-14 11:56:59 -05:00
Add ability for admins to approve hacks
This commit is contained in:
@@ -7,9 +7,10 @@ import { Menu, MenuButton, MenuItem, MenuItems, MenuSeparator } from "@headlessu
|
||||
interface HackOptionsMenuProps {
|
||||
slug: string;
|
||||
canEdit: boolean;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
export default function HackOptionsMenu({ slug, canEdit }: HackOptionsMenuProps) {
|
||||
export default function HackOptionsMenu({ slug, canEdit, children }: HackOptionsMenuProps) {
|
||||
return (
|
||||
<Menu as="div" className="relative">
|
||||
<MenuButton
|
||||
@@ -77,6 +78,10 @@ export default function HackOptionsMenu({ slug, canEdit }: HackOptionsMenuProps)
|
||||
Upload new version
|
||||
</MenuItem>
|
||||
</>}
|
||||
{children && <>
|
||||
<MenuSeparator className="my-1 h-px bg-[var(--border)]" />
|
||||
{children}
|
||||
</>}
|
||||
</MenuItems>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user