fix: move puffs map to own container

This commit is contained in:
Simon Emanuelsson
2024-02-12 16:43:46 +01:00
parent d174b12431
commit 93089289b5
8 changed files with 25 additions and 13 deletions
@@ -8,7 +8,7 @@ import styles from "./puff.module.css"
import type { PuffProps } from "@/types/components/current/asides/puff"
export default function Puff({ imageConnection, is_internal, link, link_text, pageConnection, text, title }: PuffProps) {
export default function Puff({ imageConnection, is_internal, link, pageConnection, text, title }: PuffProps) {
if (is_internal) {
const page = pageConnection.edges[0]
if (!page?.node?.url) {
+16
View File
@@ -0,0 +1,16 @@
import Puff from "./Puff"
import type { PuffsProps } from "@/types/components/current/asides/puffs"
export default function Puffs({ puffs }: PuffsProps) {
if (!puffs.length) {
return null
}
return (
<>
{puffs.map(puff => (
<Puff key={puff.node.system.uid} {...puff.node} />
))}
</>
)
}