diff --git a/src/blocks/BentoRow/Component.tsx b/src/blocks/BentoRow/Component.tsx
index 3ce1a3e..0161ed5 100644
--- a/src/blocks/BentoRow/Component.tsx
+++ b/src/blocks/BentoRow/Component.tsx
@@ -14,17 +14,12 @@ type BentoRowBlockProps = {
skills?: Skill[]
}
-export function BentoRowBlock({
- aboutHeading,
- aboutText,
- aboutCta,
- skillsHeading,
- skills,
-}: BentoRowBlockProps) {
+export function BentoRowBlock(props: BentoRowBlockProps) {
+ const { aboutHeading, aboutText, aboutCta, skillsHeading, skills } = props
+
return (
-
{aboutHeading && (
@@ -38,8 +33,8 @@ export function BentoRowBlock({
)}
- {aboutCta?.label && aboutCta?.url && (
-
+ {aboutCta && aboutCta.label && aboutCta.url && (
+
0 && (
- {skills.map((skill, i) => {
+ {skills.map(function (skill, i) {
const tags = skill.tags
- ? skill.tags.split(',').map((t) => t.trim()).filter(Boolean)
+ ? skill.tags
+ .split(',')
+ .map(function (t) {
+ return t.trim()
+ })
+ .filter(Boolean)
: []
return (
{skill.title}
- {tags.map((tag, j) => (
-
- {tag}
-
- ))}
+ {tags.map(function (tag, j) {
+ return (
+
+ {tag}
+
+ )
+ })}
)
@@ -90,8 +92,7 @@ export function BentoRowBlock({
)}
-
)
-}
\ No newline at end of file
+}
diff --git a/src/blocks/Contact/Component.tsx b/src/blocks/Contact/Component.tsx
index 2640950..996017a 100644
--- a/src/blocks/Contact/Component.tsx
+++ b/src/blocks/Contact/Component.tsx
@@ -15,28 +15,20 @@ type ContactBlockProps = {
links?: ContactLink[]
}
-export function ContactBlock({
- heading,
- subtext,
- email,
- links,
-}: ContactBlockProps) {
+export function ContactBlock(props: ContactBlockProps) {
+ const { heading, subtext, email, links } = props
+
return (
-
- {Array.isArray(links) && links.map((link, i) => (
-
- key={i}
- href={link.url}
- target={link.newTab ? '_blank' : '_self'}
- rel="noopener noreferrer"
- className="flex items-center gap-3 bg-muted/50 border border-foreground/8 rounded-xl px-5 py-4 hover:bg-muted/70 transition-colors group"
- >
- {link.icon && (
-
- )}
-
-
- {link.label}
-
- {link.sublabel && (
- {link.sublabel}
- )}
-
-
-
- ))}
+ {Array.isArray(links) &&
+ links.map(function (link, i) {
+ return (
+
+ {link.icon && (
+
+ )}
+
+
+ {link.label}
+
+ {link.sublabel && (
+ {link.sublabel}
+ )}
+
+
+
+ )
+ })}
-
)
-}
\ No newline at end of file
+}
diff --git a/src/blocks/Showcase/Component.tsx b/src/blocks/Showcase/Component.tsx
index 8459115..68647eb 100644
--- a/src/blocks/Showcase/Component.tsx
+++ b/src/blocks/Showcase/Component.tsx
@@ -21,36 +21,45 @@ function ShowcaseImage(props: { item: ShowcaseItem }): React.ReactElement {
const item = props.item
const image = item.image
const imageUrl = image != null && typeof image === 'object' && 'url' in image ? image.url : null
- const imageAlt = image != null && typeof image === 'object' && 'alt' in image ? image.alt : item.title
-
- if (imageUrl != null && item.imageUrl != null) {
- return (
-
- href={item.imageUrl}
- target="_blank"
- rel="noopener noreferrer"
- className="block relative w-full aspect-video overflow-hidden group"
- >
-
-
-
-
-
-
- )
- }
+ const imageAlt =
+ image != null && typeof image === 'object' && 'alt' in image ? image.alt : item.title
if (imageUrl != null) {
- return (
+ const imgEl = (
+ {item.imageUrl && (
+
+ )}
+ {item.imageUrl && (
+
+
+
+ )}
)
+
+ if (item.imageUrl) {
+ return (
+
+ {imgEl}
+
+ )
+ }
+ return imgEl
}
return (
-
+
Coming soon
)
@@ -65,38 +74,27 @@ export function ShowcaseBlock(props: ShowcaseBlockProps): React.ReactElement | n
{(heading || subheading) && (
- {heading && (
-
{heading}
- )}
- {subheading && (
-
{subheading}
- )}
+ {heading &&
{heading}
}
+ {subheading &&
{subheading}
}
)}
-
{items.map(function (item, i) {
const isFeatured = i === 0 && items.length > 1
return (
-
- {item.description && (
-
- {item.description.length > 40 ? item.description.slice(0, 40) + '...' : item.description}
-
- )}
-
{item.title}
-
- {item.description && item.description.length > 40 && (
+ {item.description && (
{item.description}
)}
-
{Array.isArray(item.tags) && item.tags.length > 0 && (
{item.tags.map(function (t, j) {
@@ -111,19 +109,22 @@ export function ShowcaseBlock(props: ShowcaseBlockProps): React.ReactElement | n
})}
)}
-
{Array.isArray(item.links) && item.links.length > 0 && (
{item.links.map(function (link, k) {
return (
-
+
-
+
{link.label}
)
@@ -137,4 +138,4 @@ export function ShowcaseBlock(props: ShowcaseBlockProps): React.ReactElement | n
)
-}
\ No newline at end of file
+}
diff --git a/src/heros/SplitHero/index.tsx b/src/heros/SplitHero/index.tsx
index e5672de..3ffcbb9 100644
--- a/src/heros/SplitHero/index.tsx
+++ b/src/heros/SplitHero/index.tsx
@@ -13,15 +13,8 @@ type SplitHeroProps = Page['hero'] & {
splitImage?: MediaType | null
}
-export const SplitHero: React.FC
= ({
- eyebrow,
- heading,
- subtext,
- tags,
- primaryCta,
- secondaryCta,
- splitImage,
-}) => {
+export const SplitHero: React.FC = function (props) {
+ const { eyebrow, heading, subtext, tags, primaryCta, secondaryCta, splitImage } = props
const hasImage = splitImage && typeof splitImage === 'object' && splitImage.url
return (
@@ -29,9 +22,7 @@ export const SplitHero: React.FC = ({
{eyebrow && (
-
- {eyebrow}
-
+
{eyebrow}
)}
{heading && (
@@ -39,26 +30,26 @@ export const SplitHero: React.FC = ({
)}
{subtext && (
-
- {subtext}
-
+
{subtext}
)}
{Array.isArray(tags) && tags.length > 0 && (
-
- {tags.map(({ tag }, i) => (
-
- {tag}
-
- ))}
+
+ {tags.map(function ({ tag }, i) {
+ return (
+
+ {tag}
+
+ )
+ })}
)}
-
{hasImage ? (
-
+
) : (
@@ -96,4 +81,4 @@ export const SplitHero: React.FC = ({
)
-}
\ No newline at end of file
+}