feat: enhance canvas functionality with new asset node type and improved image handling
- Introduced a new "asset" node type in the canvas sidebar for better resource management. - Updated image node components to support dynamic image dimensions and improved resizing logic. - Enhanced prompt and AI image nodes to utilize reference images from asset nodes, improving integration and functionality. - Refactored canvas utilities to accommodate new asset configurations and maintain consistent media handling.
This commit is contained in:
@@ -4,7 +4,7 @@ import Image from "next/image";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useTheme } from "next-themes";
|
||||
import { useMutation, useQuery } from "convex/react";
|
||||
import { useMutation } from "convex/react";
|
||||
import {
|
||||
ChevronDown,
|
||||
Coins,
|
||||
@@ -35,6 +35,7 @@ import { RecentTransactions } from "@/components/dashboard/recent-transactions";
|
||||
import CanvasCard from "@/components/dashboard/canvas-card";
|
||||
import { toast } from "@/lib/toast";
|
||||
import { msg } from "@/lib/toast-messages";
|
||||
import { useAuthQuery } from "@/hooks/use-auth-query";
|
||||
|
||||
|
||||
function getInitials(nameOrEmail: string) {
|
||||
@@ -54,7 +55,7 @@ export default function DashboardPage() {
|
||||
const welcomeToastSentRef = useRef(false);
|
||||
const { theme = "system", setTheme } = useTheme();
|
||||
const { data: session, isPending: isSessionPending } = authClient.useSession();
|
||||
const canvases = useQuery(
|
||||
const canvases = useAuthQuery(
|
||||
api.canvases.list,
|
||||
session?.user && !isSessionPending ? {} : "skip",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user