This commit is contained in:
eric
2026-03-12 00:41:50 -05:00
parent 5caf970c7e
commit 7e8f0e3e40
3 changed files with 59 additions and 58 deletions

View File

@@ -12,7 +12,8 @@ export function TopicEntries() {
className={`${styles.topicGrid} animate__animated animate__fadeInUp`}
style={{ animationDelay: "0.2s", animationFillMode: "both" }}
>
{TOPICS.map((t, i) => {
{TOPICS.map((t) => {
const { id, href } = t;
const content = (
<>
<span className={styles.topicIcon}>{t.icon}</span>
@@ -20,21 +21,18 @@ export function TopicEntries() {
<span className={styles.topicDesc}>{t.desc}</span>
</>
);
if (t.href) {
return (
<Link
key={t.id}
href={t.href}
className={styles.topicCard}
target={t.href.startsWith("http") ? "_blank" : undefined}
rel={t.href.startsWith("http") ? "noopener noreferrer" : undefined}
>
{content}
</Link>
);
}
return (
<div key={t.id} className={styles.topicCard} style={{ cursor: "default", opacity: 0.7 }}>
return href ? (
<Link
key={id}
href={href}
className={styles.topicCard}
target={href.startsWith("http") ? "_blank" : undefined}
rel={href.startsWith("http") ? "noopener noreferrer" : undefined}
>
{content}
</Link>
) : (
<div key={id} className={styles.topicCard} style={{ cursor: "default", opacity: 0.7 }}>
{content}
</div>
);