diff --git a/spa/src/components/back-button.tsx b/spa/src/components/back-button.tsx new file mode 100644 index 0000000..d0e9529 --- /dev/null +++ b/spa/src/components/back-button.tsx @@ -0,0 +1,17 @@ +import { useRouter } from "@tanstack/react-router" +import { useTranslation } from "react-i18next" +import { ArrowLeft } from "lucide-react" + +export function BackButton() { + const { t } = useTranslation() + const router = useRouter() + + return ( + + ) +} diff --git a/spa/src/components/log-sheet.tsx b/spa/src/components/log-sheet.tsx index b9c6ae8..ad87e81 100644 --- a/spa/src/components/log-sheet.tsx +++ b/spa/src/components/log-sheet.tsx @@ -10,6 +10,7 @@ import type { MovieSelection } from "@/components/search-overlay" import { useLogReview } from "@/hooks/use-diary" import { toast } from "sonner" import { posterUrl } from "@/lib/api/client" +import { hapticMedium } from "@/lib/haptics" type LogSheetProps = { open: boolean @@ -48,6 +49,7 @@ export function LogSheet({ open, onOpenChange }: LogSheetProps) { }, { onSuccess: () => { + hapticMedium() toast.success(t("logReview.logged", { title: movie.title })) handleClose() }, diff --git a/spa/src/components/movie-card.tsx b/spa/src/components/movie-card.tsx index f991139..ed8ced5 100644 --- a/spa/src/components/movie-card.tsx +++ b/spa/src/components/movie-card.tsx @@ -10,9 +10,10 @@ type MovieCardProps = { comment?: string subtitle?: string variant?: "compact" | "full" + action?: React.ReactNode } -export function MovieCard({ movie, rating, comment, subtitle, variant = "full" }: MovieCardProps) { +export function MovieCard({ movie, rating, comment, subtitle, variant = "full", action }: MovieCardProps) { if (variant === "compact") { return ( @@ -41,6 +42,7 @@ export function MovieCard({ movie, rating, comment, subtitle, variant = "full" } {rating != null &&
{comment}
} + {action &&