Skip to content

Commit

Permalink
fix: button
Browse files Browse the repository at this point in the history
  • Loading branch information
nnivxix committed Oct 26, 2024
1 parent de1b72d commit 882fa4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/components/CardItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Star } from "lucide-react";
import Link from "next/link";
import RImage from "./RImage";
import imageUrl from "../utils/image-url";
import { buttonVariants } from "./ui/button";


interface CardItemProps {
movie: MovieTv;
Expand All @@ -26,7 +28,7 @@ export default function CardItem({ movie, media }: CardItemProps) {
<h1 className="pb-2 text-xl font-bold">{movieTitle}</h1>
<p className="line-clamp-6">{movie.overview}</p>
<div className="mt-3 w-full self-end mb-4 font-bold">
<Link className="w-full" href={`/show/${mediaType}/${movie.id}`}>
<Link className={`w-full ${buttonVariants({ variant: "default" })}`} href={`/show/${mediaType}/${movie.id}`}>
View
</Link>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/components/SimilarCardItem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client"
import type { SimilarMovie, SimilarTv } from "@/types/response";
import { Star } from "lucide-react";
import { Button } from "./ui/button";
import { buttonVariants } from "./ui/button";
import Link from "next/link";
import RImage from "./RImage";
import imageUrl from "@/utils/image-url";
Expand Down Expand Up @@ -30,11 +30,11 @@ export default function SimilarCardItem<
<div className="z-30 p-2 text-white absolute hidden group-hover:grid grid-cols-1 bg-black/50 backdrop-blur-sm w-full h-full">
<h1 className="pb-2 text-xl font-bold">{movieTitle}</h1>
<p className="line-clamp-6">{card.overview}</p>
<Button className="mt-3 w-full self-end mb-4 font-bold">
<Link className="w-full" href={`/show/${mediaType}/${card.id}`}>
<div className="mt-3 w-full self-end mb-4 font-bold">
<Link className={`w-full ${buttonVariants({ variant: 'default' })}`} href={`/show/${mediaType}/${card.id}`}>
View
</Link>
</Button>
</div>
</div>
<div className="relative">
<Link href={`/show/${mediaType}/${card.id}`}>
Expand Down
1 change: 0 additions & 1 deletion src/components/ui/button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"use client"
import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
import { cva, type VariantProps } from "class-variance-authority"
Expand Down

0 comments on commit 882fa4e

Please sign in to comment.