feat: shared back navigation on detail pages

This commit is contained in:
ginnoir
2026-07-04 18:23:15 -05:00
parent 1a1c080d18
commit d090200ec8
10 changed files with 115 additions and 39 deletions
@@ -3,6 +3,7 @@
import { useRouter } from "next/navigation";
import { Pin, PinOff, Save, Trash2 } from "lucide-react";
import { useState, useTransition } from "react";
import { DetailBackLink } from "@/components/detail-back-link";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
@@ -65,6 +66,7 @@ export function NoteEditor({ note }: { note?: NoteDto }) {
return (
<div className="mx-auto grid w-full max-w-6xl gap-4">
<DetailBackLink href="/notes" label="Notes" />
<header className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
<div className="flex items-center gap-2 min-w-0 flex-1">
{pinned && <Pin className="size-3.5 text-[var(--accent)]" />}