Small fixes
This commit is contained in:
@@ -118,6 +118,10 @@ export default function DocView({
|
||||
},
|
||||
data: doc,
|
||||
async onChange() {
|
||||
if (!editor || !editor.save) {
|
||||
console.warn("unable to save, editor.save is null");
|
||||
return;
|
||||
}
|
||||
const savedData = await editor.save();
|
||||
console.log("Document data:", toMarkdown(savedData));
|
||||
setDoc(savedData);
|
||||
|
||||
@@ -10,21 +10,7 @@ import {
|
||||
} from "@/components/ui/sheet";
|
||||
import { Task } from "@/lib/types";
|
||||
import { Color, getColor } from "@/lib/ui/color";
|
||||
import { DraggableProvided } from "@hello-pangea/dnd";
|
||||
import { Button } from "../../ui/button";
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogHeader,
|
||||
DialogTrigger,
|
||||
} from "../../ui/dialog";
|
||||
import DocView from "../DocView";
|
||||
import { useState } from "react";
|
||||
import { OutputData } from "@editorjs/editorjs";
|
||||
import { DialogTitle } from "@radix-ui/react-dialog";
|
||||
import { ScrollArea } from "../../ui/scroll-area";
|
||||
import { Badge } from "../../ui/badge";
|
||||
import DocDialog from "./DocDialog";
|
||||
|
||||
export default function TaskEdit({
|
||||
@@ -66,7 +52,7 @@ export default function TaskEdit({
|
||||
/>
|
||||
</div>
|
||||
<div className="grid gap-3">
|
||||
<Label>Status</Label>
|
||||
<Label>Tags</Label>
|
||||
<MultiSelect
|
||||
options={Object.entries(tags).map(([id, tag]) => ({
|
||||
label: tag.name,
|
||||
|
||||
Reference in New Issue
Block a user