fix: placeholder image for thumbnails
Signed-off-by: Varun Raj <mailme@varunraj.in>
This commit is contained in:
1 parent
ac4233d934
commit
8a49501f54
2 files changed
+3
-3
No files matched your search
@@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
|
||||||
import Sidebar from "../shared/Sidebar"
|
import Sidebar from "../shared/Sidebar"
|
||||||
import { Toaster } from "../ui/toaster"
|
import { Toaster } from "../ui/toaster"
|
||||||
|
|
||||||
@@ -16,7 +15,6 @@ export default function RootLayout({ children }: RootLayoutProps) {
|
|||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
<Toaster />
|
<Toaster />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||||||
// Send the image data
|
// Send the image data
|
||||||
res.send(Buffer.from(imageBuffer))
|
res.send(Buffer.from(imageBuffer))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
|
res.redirect("https://placehold.co/400")
|
||||||
console.error('Error:', error)
|
console.error('Error:', error)
|
||||||
res.status(500).json({ message: 'Internal Server Error' })
|
// res.status(500).json({ message: 'Internal Server Error' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user