upgrade to next 15 (#151)

This commit is contained in:
KM Koushik
2025-05-02 20:49:37 +10:00
committed by GitHub
parent 6dc6b4d213
commit d2587aed0d
28 changed files with 6814 additions and 8889 deletions

View File

@@ -11,22 +11,24 @@ import { useDebouncedCallback } from "use-debounce";
import { formatDistanceToNow } from "date-fns";
import { ArrowLeft } from "lucide-react";
import Link from "next/link";
import { use } from "react";
const IMAGE_SIZE_LIMIT = 10 * 1024 * 1024;
export default function EditTemplatePage({
params,
}: {
params: { templateId: string };
params: Promise<{ templateId: string }>;
}) {
const { templateId } = use(params);
const {
data: template,
isLoading,
error,
} = api.template.getTemplate.useQuery(
{ templateId: params.templateId },
{ templateId: templateId },
{
enabled: !!params.templateId,
enabled: !!templateId,
}
);
@@ -75,7 +77,6 @@ function TemplateEditor({
});
const getUploadUrl = api.template.generateImagePresignedUrl.useMutation();
function updateEditorContent() {
updateTemplateMutation.mutate({
templateId: template.id,
@@ -195,7 +196,6 @@ function TemplateEditor({
</div>
</div>
<div className=" rounded-lg bg-gray-50 w-[700px] mx-auto p-10">
<div className="w-[600px] mx-auto">
<Editor