Add external property to feature card interface
cgen-c79aa72f12ef4065ad6d0db1a9549469
This commit is contained in:
parent
6c178cc163
commit
1cc6c3c56e
1 changed files with 20 additions and 7 deletions
|
|
@ -49,6 +49,7 @@ export default function Index() {
|
||||||
type FeatureCard = {
|
type FeatureCard = {
|
||||||
title: string;
|
title: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
external?: boolean;
|
||||||
icon: any;
|
icon: any;
|
||||||
color: string;
|
color: string;
|
||||||
link?: string;
|
link?: string;
|
||||||
|
|
@ -344,13 +345,25 @@ export default function Index() {
|
||||||
/>
|
/>
|
||||||
{feature.link ? (
|
{feature.link ? (
|
||||||
<div className="pt-1">
|
<div className="pt-1">
|
||||||
<Link
|
{feature.external ? (
|
||||||
to={feature.link}
|
<a
|
||||||
className="text-xs inline-flex items-center gap-1 text-aethex-300 hover:text-aethex-200"
|
href={feature.link}
|
||||||
>
|
target="_blank"
|
||||||
Explore
|
rel="noopener noreferrer"
|
||||||
<ArrowRight className="h-3 w-3" />
|
className="text-xs inline-flex items-center gap-1 text-aethex-300 hover:text-aethex-200"
|
||||||
</Link>
|
>
|
||||||
|
Explore
|
||||||
|
<ArrowRight className="h-3 w-3" />
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<Link
|
||||||
|
to={feature.link}
|
||||||
|
className="text-xs inline-flex items-center gap-1 text-aethex-300 hover:text-aethex-200"
|
||||||
|
>
|
||||||
|
Explore
|
||||||
|
<ArrowRight className="h-3 w-3" />
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue