feat: remove temppage
This commit is contained in:
@@ -8,16 +8,23 @@ 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, system, text, title }: PuffProps) {
|
||||
return is_internal ? (
|
||||
<Link className={styles.link} href={link.href}>
|
||||
<PuffContent
|
||||
imageConnection={imageConnection}
|
||||
text={text}
|
||||
title={title}
|
||||
/>
|
||||
</Link>
|
||||
) : (
|
||||
export default function Puff({ imageConnection, is_internal, link, link_text, pageConnection, text, title }: PuffProps) {
|
||||
if (is_internal) {
|
||||
const page = pageConnection.edges[0]
|
||||
if (!page?.node?.url) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<Link className={styles.link} href={page.node.url}>
|
||||
<PuffContent
|
||||
imageConnection={imageConnection}
|
||||
text={text}
|
||||
title={title}
|
||||
/>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<a className={styles.link} href={link.href} target="_blank">
|
||||
<PuffContent
|
||||
imageConnection={imageConnection}
|
||||
|
||||
Reference in New Issue
Block a user