fix: album creation flow

Signed-off-by: Varun Raj <varun@skcript.com>
This commit is contained in:
Varun Raj
2025-07-27 18:04:35 +05:30
parent aef4e6ee86
commit 263212c8b9
4 changed files with 10 additions and 9 deletions
+5 -5
View File
@@ -1,11 +1,11 @@
import { GalleryHorizontal, GalleryVerticalEnd, Image as ImageIcon, MapPin, MapPinX, Rewind, Search, User } from "lucide-react";
export const sidebarNavs = [
{
title: "Rewind 2024",
link: "/rewind",
icon: <Rewind className="h-4 w-4" />,
},
// {
// title: "Rewind 2024",
// link: "/rewind",
// icon: <Rewind className="h-4 w-4" />,
// },
{
title: "Find Assets",
link: "/find",
-1
View File
@@ -19,7 +19,6 @@ export class APIError extends Error {
}
const handleErrors = (error: AxiosError | any) => {
let errorObject = {}
if (error.response && error.response.data) {
return Promise.reject({
+2
View File
@@ -79,6 +79,8 @@ export default function PotentialAlbums() {
});
const newAssets = contextState.assets.filter(a => !contextState.selectedIds.includes(a.id));
updateContext({ selectedIds: [], assets: newAssets });
}).catch((error) => {
console.log("Error", error);
})
}
+3 -3
View File
@@ -28,9 +28,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
res.setHeader(key, value)
})
// Stream the response body
const reader = response.body?.getReader()
if (reader) {
// Only stream the response body if it exists and has content
if (response.body) {
const reader = response.body.getReader()
while (true) {
const { done, value } = await reader.read()
if (done) break