From 340259112f4ccfcf246298be47c5ba24bcf26292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20Boj=C4=8Di=C4=87?= Date: Wed, 4 Jun 2025 13:46:48 +0100 Subject: [PATCH] feat: make navigation stack-like --- app/components/page.tsx | 16 ++++++++++++---- app/components/search-bar.tsx | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/components/page.tsx b/app/components/page.tsx index a62cd0458..49fe1b040 100644 --- a/app/components/page.tsx +++ b/app/components/page.tsx @@ -26,9 +26,13 @@ export function Page({ children, className, ...props }: PageProps) { interface ClosePageButtonProps extends ViewTransitionLinkProps {} -export function ClosePageButton({ className, ...props }: ClosePageButtonProps) { +export function ClosePageButton({ + className, + replace = true, + ...props +}: ClosePageButtonProps) { return ( - + ); @@ -36,9 +40,13 @@ export function ClosePageButton({ className, ...props }: ClosePageButtonProps) { export interface PageBackButtonProps extends ViewTransitionLinkProps {} -export function PageBackButton({ className, ...props }: PageBackButtonProps) { +export function PageBackButton({ + className, + replace = true, + ...props +}: PageBackButtonProps) { return ( - + ); diff --git a/app/components/search-bar.tsx b/app/components/search-bar.tsx index a0278a025..0b93c7703 100644 --- a/app/components/search-bar.tsx +++ b/app/components/search-bar.tsx @@ -1,5 +1,5 @@ -import { useDebounceCallback } from 'usehooks-ts'; import { LoaderCircle } from 'lucide-react'; +import { useDebounceCallback } from 'usehooks-ts'; import { Input } from '~/components/ui/input'; type SearchBarProps = {