Skip to content

Commit a21a400

Browse files
committed
fix: mobile CallToAction sizing
1 parent 86267fe commit a21a400

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

src/app/art/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export default function ArtPage() {
2727
<CallToAction
2828
picture={refSheet.images[0] ? { src: refSheet.images[0] } : undefined}
2929
href={`/art/${refSheetArtist.slug}/${refSheet.slug}` as Route}
30-
picMaxWidth="80vw"
3130
>
3231
<div className="flex min-h-[400px] flex-col justify-end gap-3 p-6 md:p-10">
3332
{/* Artist name */}

src/components/clients/ClientCallToAction.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ type ClientCallToActionProps = {
1010
};
1111

1212
export const ClientCallToAction: React.FC<ClientCallToActionProps> = ({ client }) => (
13-
<CallToAction
14-
href={`/clients/${client.slug}` as Route}
15-
picture={client.banner ? { src: client.banner } : undefined}
16-
picMaxWidth="40vw"
17-
>
13+
<CallToAction href={`/clients/${client.slug}` as Route} picture={client.banner ? { src: client.banner } : undefined}>
1814
<div className="flex flex-col gap-3 p-6 md:p-10">
1915
<div className="flex flex-row items-center">
2016
<div className={`h-2 w-2 rounded-full ${client.end ? "bg-red-500" : "bg-green-500"}`} />

src/components/interactive/CallToAction.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,10 @@ type CallToActionProps = {
99
src: StaticImageData;
1010
alt?: string;
1111
};
12-
picMaxWidth?: string;
1312
} & React.PropsWithChildren &
1413
React.ComponentProps<typeof Link>;
1514

16-
export const CallToAction: React.FC<CallToActionProps> = ({
17-
picture,
18-
picMaxWidth = "100%",
19-
className,
20-
children,
21-
...props
22-
}) => (
15+
export const CallToAction: React.FC<CallToActionProps> = ({ picture, className, children, ...props }) => (
2316
<Link
2417
{...props}
2518
className={cn(
@@ -30,13 +23,7 @@ export const CallToAction: React.FC<CallToActionProps> = ({
3023
<div className="absolute inset-0">
3124
{picture ? (
3225
<>
33-
<Image
34-
src={picture.src}
35-
alt={picture.alt || "Cover"}
36-
fill
37-
className="h-full w-full object-cover object-top"
38-
style={{ maxWidth: picMaxWidth }}
39-
/>
26+
<Image src={picture.src} alt={picture.alt || "Cover"} fill className="h-full w-full object-cover" />
4027
<div className="absolute top-0 left-0 z-[1] h-full w-full bg-gradient-to-b from-transparent to-black/80" />
4128
</>
4229
) : (

0 commit comments

Comments
 (0)