fix(web): align carousel content and allow preview access
- Inset carousel headings to match their controls - Add a preview route and allow access during development
This commit is contained in:
4 files changed
+48
-11
No files matched your search
@@ -0,0 +1,33 @@
|
||||
"use client"
|
||||
|
||||
import { ContentCarousel } from "@/components/content-carousel"
|
||||
import type { Id } from "@otunes/convex/_generated/dataModel"
|
||||
import type { BrowseAlbum } from "@otunes/convex/types"
|
||||
|
||||
const albums: BrowseAlbum[] = Array.from({ length: 8 }, (_, index) => ({
|
||||
id: `album-${index}` as Id<"albums">,
|
||||
title: `Album ${index + 1}`,
|
||||
cover: null,
|
||||
artist: {
|
||||
id: "artist-1" as Id<"artists">,
|
||||
name: "Preview Artist",
|
||||
photo: null,
|
||||
},
|
||||
}))
|
||||
|
||||
export default function CarouselPreviewPage() {
|
||||
return (
|
||||
<div className="flex flex-col gap-10 p-6">
|
||||
<ContentCarousel
|
||||
title="Recently Played"
|
||||
href="/recently-played"
|
||||
content={albums}
|
||||
/>
|
||||
<ContentCarousel
|
||||
title="Recently Added"
|
||||
href="/recently-added"
|
||||
content={albums}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -80,17 +80,19 @@ export function ContentCarousel({
|
||||
}) {
|
||||
return (
|
||||
<section className={cn("flex min-w-0 flex-col gap-4", className)}>
|
||||
{href ? (
|
||||
<Link
|
||||
href={href}
|
||||
className="group inline-flex w-fit items-center gap-1 text-xl font-bold tracking-tight"
|
||||
>
|
||||
{title}
|
||||
<ChevronRightIcon className="size-5 text-muted-foreground transition-transform group-hover:translate-x-0.5" />
|
||||
</Link>
|
||||
) : (
|
||||
<h2 className="text-xl font-bold tracking-tight">{title}</h2>
|
||||
)}
|
||||
<div className="px-8">
|
||||
{href ? (
|
||||
<Link
|
||||
href={href}
|
||||
className="group inline-flex w-fit items-center gap-1 text-xl font-bold tracking-tight"
|
||||
>
|
||||
{title}
|
||||
<ChevronRightIcon className="size-5 text-muted-foreground transition-transform group-hover:translate-x-0.5" />
|
||||
</Link>
|
||||
) : (
|
||||
<h2 className="text-xl font-bold tracking-tight">{title}</h2>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Carousel
|
||||
opts={{
|
||||
|
||||
@@ -2,6 +2,7 @@ import path from "node:path"
|
||||
import type { NextConfig } from "next"
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
allowedDevOrigins: ["192.168.86.253"],
|
||||
output: "standalone",
|
||||
outputFileTracingRoot: path.join(__dirname, "../../"),
|
||||
experimental: {
|
||||
|
||||
@@ -14,6 +14,7 @@ const isPublic = createRouteMatcher([
|
||||
"/artist/:id",
|
||||
"/artists/:id",
|
||||
"/playlist/:id",
|
||||
"/carousel-preview",
|
||||
])
|
||||
|
||||
export default convexAuthNextjsMiddleware(
|
||||
|
||||
Reference in new issue
Block a user