Skip to content

Commit

Permalink
try img support splash
Browse files Browse the repository at this point in the history
  • Loading branch information
vaultec81 authored Jan 12, 2024
1 parent 67fb10d commit 25a2ad2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import styles from './styles.module.css';

type FeatureItem = {
title: string;
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
Svg?: React.ComponentType<React.ComponentProps<'svg'>>;
src: string
description: JSX.Element;
};

const FeatureList: FeatureItem[] = [
{
title: 'Open smart contracts',
Svg: require('@site/static/img/splash_1.png').default,
src: require('@site/static/img/splash_1.png').default,
description: (
<>
VSC smart contracts were build from the ground up for openness and transparancy.
Expand All @@ -21,7 +22,7 @@ const FeatureList: FeatureItem[] = [
},
{
title: 'Scalable & future proof',
Svg: require('@site/static/img/splash_2.png').default,
src: require('@site/static/img/splash_2.png').default,
description: (
<>
VSC is a L2 sidechain.
Expand All @@ -31,7 +32,7 @@ const FeatureList: FeatureItem[] = [
},
{
title: 'Lightning Fast',
Svg: require('@site/static/img/splash_3.png').default,
src: require('@site/static/img/splash_3.png').default,
description: (
<>
VSC is powered by the Hive blockchain's lightning fast 3s block times and one block irreversibility.
Expand All @@ -41,11 +42,12 @@ const FeatureList: FeatureItem[] = [
},
];

function Feature({title, Svg, description}: FeatureItem) {
function Feature({title, Svg, src, description}: FeatureItem) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
{/* <Svg className={styles.featureSvg} role="img" /> */}
<img className={styles.featureSvg} src={src} />
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
Expand Down

0 comments on commit 25a2ad2

Please sign in to comment.