Fix admin photo menu type
This commit is contained in:
parent
6eecb553f4
commit
dd553cd0ed
@ -8,10 +8,11 @@ import { Photo, deleteConfirmationTextForPhoto } from '@/photo';
|
|||||||
import { isPathFavs, isPhotoFav } from '@/tag';
|
import { isPathFavs, isPhotoFav } from '@/tag';
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from 'next/navigation';
|
||||||
import { BiTrash } from 'react-icons/bi';
|
import { BiTrash } from 'react-icons/bi';
|
||||||
import MoreMenu, { MoreMenuItem } from '@/components/more/MoreMenu';
|
import MoreMenu from '@/components/more/MoreMenu';
|
||||||
import { useAppState } from '@/state/AppState';
|
import { useAppState } from '@/state/AppState';
|
||||||
import { RevalidatePhoto } from '@/photo/InfinitePhotoScroll';
|
import { RevalidatePhoto } from '@/photo/InfinitePhotoScroll';
|
||||||
import { MdOutlineFileDownload } from 'react-icons/md';
|
import { MdOutlineFileDownload } from 'react-icons/md';
|
||||||
|
import MoreMenuItem from '@/components/more/MoreMenuItem';
|
||||||
|
|
||||||
export default function AdminPhotoMenuClient({
|
export default function AdminPhotoMenuClient({
|
||||||
photo,
|
photo,
|
||||||
@ -33,7 +34,7 @@ export default function AdminPhotoMenuClient({
|
|||||||
const favIconClass = 'translate-x-[-1px] translate-y-[0.5px]';
|
const favIconClass = 'translate-x-[-1px] translate-y-[0.5px]';
|
||||||
|
|
||||||
const items = useMemo(() => {
|
const items = useMemo(() => {
|
||||||
const items: MoreMenuItem[] = [{
|
const items: ComponentProps<typeof MoreMenuItem>[] = [{
|
||||||
label: 'Edit',
|
label: 'Edit',
|
||||||
icon: <FaRegEdit size={14} />,
|
icon: <FaRegEdit size={14} />,
|
||||||
href: pathForAdminPhotoEdit(photo.id),
|
href: pathForAdminPhotoEdit(photo.id),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user