Moves routes inside an _app for the header and builds a print route
This commit is contained in:
26
src/components/documents/secret/SecretPrintRow.tsx
Normal file
26
src/components/documents/secret/SecretPrintRow.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
// SecretRow.tsx
|
||||
// Displays a single secret with discovered checkbox and text.
|
||||
import type { Secret, Session } from "@/lib/types";
|
||||
import { pb } from "@/lib/pocketbase";
|
||||
import { useState } from "react";
|
||||
|
||||
/**
|
||||
* Renders a secret row with a discovered checkbox and secret text.
|
||||
* Handles updating the discovered state and discoveredIn relationship.
|
||||
*/
|
||||
export const SecretPrintRow = ({ secret }: { secret: Secret }) => {
|
||||
return (
|
||||
<li className="flex items-center gap-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
className="flex-none accent-emerald-500 w-5 h-5"
|
||||
aria-label="Discovered"
|
||||
/>
|
||||
<span>
|
||||
{(secret.data as any)?.secret?.text || (
|
||||
<span className="italic text-slate-400">(No secret text)</span>
|
||||
)}
|
||||
</span>
|
||||
</li>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user