I'm making a next.js/react app using typescript.
I have a query to get every level:
import { v } from "convex/values";
import { mutation, query } from "./_generated/server";
import { Doc, Id } from "./_generated/dataModel";
export const get = query({
handler: async (ctx) => {
const levels = await ctx.db.query("levels").collect();
return levels;
}
});
Then I want to set an image to have the src of this image sitting in the files:
"use client";
import { api } from "@/convex/_generated/api";
import { useQuery } from "convex/react";
import Image from "next/image";
const GameModesPage = () => {
return (
<div>
<Image src={imageSrcUrl} />
</div>
);
}
export default GameModesPage;
Can anyone help me do this? I am a little confused on the documentation