feat: add Resend integration for email verification and update package dependencies
- Integrated Resend for sending email verification upon user sign-up. - Updated package.json to include Resend as a dependency. - Enhanced authentication flow with error handling for email sending. - Removed outdated Canvas Implementation Guide documentation.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import { notFound, redirect } from "next/navigation";
|
||||
|
||||
import Canvas from "@/components/canvas/canvas";
|
||||
import CanvasToolbar from "@/components/canvas/canvas-toolbar";
|
||||
import { api } from "@/convex/_generated/api";
|
||||
import type { Id } from "@/convex/_generated/dataModel";
|
||||
import { isAuthenticated } from "@/lib/auth-server";
|
||||
import { fetchAuthQuery, isAuthenticated } from "@/lib/auth-server";
|
||||
|
||||
export default async function CanvasPage({
|
||||
params,
|
||||
@@ -18,6 +19,17 @@ export default async function CanvasPage({
|
||||
const { canvasId } = await params;
|
||||
const typedCanvasId = canvasId as Id<"canvases">;
|
||||
|
||||
try {
|
||||
const canvas = await fetchAuthQuery(api.canvases.get, {
|
||||
canvasId: typedCanvasId,
|
||||
});
|
||||
if (!canvas) {
|
||||
notFound();
|
||||
}
|
||||
} catch {
|
||||
notFound();
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="relative h-screen w-screen overflow-hidden">
|
||||
<CanvasToolbar canvasId={typedCanvasId} />
|
||||
|
||||
Reference in New Issue
Block a user