I think I have a working document cache solution that's actually pretty good.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { AutoSaveTextarea } from "@/components/AutoSaveTextarea";
|
||||
import { useDocument } from "@/context/document/DocumentContext";
|
||||
import { useDocumentCache } from "@/context/document/hooks";
|
||||
import { pb } from "@/lib/pocketbase";
|
||||
import type { Session } from "@/lib/types";
|
||||
|
||||
export const SessionEditForm = ({ session }: { session: Session }) => {
|
||||
const { dispatch } = useDocument();
|
||||
const { dispatch } = useDocumentCache();
|
||||
|
||||
async function saveStrongStart(strongStart: string) {
|
||||
const doc: Session = await pb.collection("documents").update(session.id, {
|
||||
|
||||
Reference in New Issue
Block a user