Merged in fix/puffs-map-in-map (pull request #23)
fix: move puffs map to own container Approved-by: Michael Zetterberg
This commit is contained in:
@@ -8,7 +8,7 @@ import styles from "./puff.module.css"
|
||||
import type { PuffProps } from "@/types/components/current/asides/puff"
|
||||
import Image from "@/components/Image"
|
||||
|
||||
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
components/Current/Asides/Puffs/index.tsx
Normal file
16
components/Current/Asides/Puffs/index.tsx
Normal 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} />
|
||||
))}
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user