Merge branch 'main' into static
This commit is contained in:
commit
e68bac3630
@ -20,6 +20,7 @@ export default function AdminPhotoMenuClient({
|
||||
const path = usePathname();
|
||||
const shouldRedirectFav = isPathFavs(path) && isFav;
|
||||
const shouldRedirectDelete = pathForPhoto(photo.id) === path;
|
||||
|
||||
return (
|
||||
<>
|
||||
<MoreMenu {...{
|
||||
|
||||
@ -76,7 +76,7 @@ export async function toggleFavoritePhotoAction(
|
||||
await sqlUpdatePhoto(convertPhotoToPhotoDbInsert(photo));
|
||||
revalidateAllKeysAndPaths();
|
||||
if (shouldRedirect) {
|
||||
redirect(PATH_ROOT);
|
||||
redirect(pathForPhoto(photoId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user