I think I have a working document cache solution that's actually pretty good.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
// TreasureRow.tsx
|
||||
// Displays a single treasure with discovered checkbox and text.
|
||||
import type { Treasure, Session } from "@/lib/types";
|
||||
import { pb } from "@/lib/pocketbase";
|
||||
import type { Session, Treasure } from "@/lib/types";
|
||||
import { Link } from "@tanstack/react-router";
|
||||
import { useState } from "react";
|
||||
|
||||
/**
|
||||
@@ -68,7 +69,13 @@ export const TreasureToggleRow = ({
|
||||
aria-label="Discovered"
|
||||
disabled={loading}
|
||||
/>
|
||||
<span>{treasure.data.text}</span>
|
||||
<Link
|
||||
to="/document/$documentId"
|
||||
params={{ documentId: treasure.id }}
|
||||
className="text-lg !no-underline text-slate-100 hover:underline hover:text-violet-400"
|
||||
>
|
||||
{treasure.data.text}
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user