media
This commit is contained in:
parent
4197f205f4
commit
354b93fd28
1 changed files with 5 additions and 4 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
|
'use client'
|
||||||
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { ImageMedia } from '../ImageMedia' // Adjust this path to wherever your ImageMedia file lives
|
import { ImageMedia } from '@/components/ImageMedia' // Fixed path alias
|
||||||
import type { Media as MediaType } from '@/payload-types'
|
import type { Media as MediaType } from '@/payload-types'
|
||||||
|
|
||||||
type ButtonGroup = {
|
type ButtonGroup = {
|
||||||
|
|
@ -29,7 +31,6 @@ export function AboutProfileBlock({
|
||||||
}: AboutProfileBlockProps) {
|
}: AboutProfileBlockProps) {
|
||||||
const isRight = imagePosition === 'right'
|
const isRight = imagePosition === 'right'
|
||||||
|
|
||||||
// Using your unified ImageMedia component handles S3 URLs, fallback widths, heights, and alt texts seamlessly
|
|
||||||
const imageEl = image ? (
|
const imageEl = image ? (
|
||||||
<div className="w-full sm:w-[340px] shrink-0 rounded-xl overflow-hidden bg-muted/50">
|
<div className="w-full sm:w-[340px] shrink-0 rounded-xl overflow-hidden bg-muted/50">
|
||||||
<ImageMedia
|
<ImageMedia
|
||||||
|
|
@ -71,7 +72,7 @@ export function AboutProfileBlock({
|
||||||
{(hasPrimary || hasSecondary) && (
|
{(hasPrimary || hasSecondary) && (
|
||||||
<div className="flex flex-wrap gap-3 mt-2">
|
<div className="flex flex-wrap gap-3 mt-2">
|
||||||
{hasPrimary && (
|
{hasPrimary && (
|
||||||
<a // <--- Fixed missing '<' opening bracket here
|
<a
|
||||||
href={primaryButton.url}
|
href={primaryButton.url}
|
||||||
download
|
download
|
||||||
className="flex items-center gap-2 text-sm px-5 py-2.5 rounded-lg bg-muted/50 border border-foreground/10 text-foreground/70 hover:text-foreground/90 hover:bg-muted transition-colors"
|
className="flex items-center gap-2 text-sm px-5 py-2.5 rounded-lg bg-muted/50 border border-foreground/10 text-foreground/70 hover:text-foreground/90 hover:bg-muted transition-colors"
|
||||||
|
|
@ -81,7 +82,7 @@ export function AboutProfileBlock({
|
||||||
</a>
|
</a>
|
||||||
)}
|
)}
|
||||||
{hasSecondary && (
|
{hasSecondary && (
|
||||||
<a // <--- Fixed missing '<' opening bracket here
|
<a
|
||||||
href={secondaryButton.url}
|
href={secondaryButton.url}
|
||||||
target={secondaryButton.newTab ? '_blank' : '_self'}
|
target={secondaryButton.newTab ? '_blank' : '_self'}
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue