Skip to content

Commit

Permalink
Remove redundant Svg requires from components
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Dec 17, 2023
1 parent cf8d96b commit 355da53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion website/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Options, ThemeConfig } from '@docusaurus/preset-classic'
import type { Config } from '@docusaurus/types'
import { themes as prismThemes } from 'prism-react-renderer'

const config: Config = {
title: 'Reselect',
Expand Down
12 changes: 2 additions & 10 deletions website/src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import Heading from '@theme/Heading'
import clsx from 'clsx'
import type { ComponentProps, ComponentType, FC } from 'react'
import type { FC } from 'react'
import { memo } from 'react'
import styles from './styles.module.css'

interface FeatureItem {
title: string
Svg: ComponentType<ComponentProps<'svg'>>
description: JSX.Element
}

const FeatureList: FeatureItem[] = [
{
title: 'Predictable',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
description: (
<>
Like Redux, Reselect gives users a <b>consistent mental model</b> for
Expand All @@ -24,7 +22,6 @@ const FeatureList: FeatureItem[] = [
},
{
title: 'Optimized',
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
description: (
<>
Reselect{' '}
Expand All @@ -38,7 +35,6 @@ const FeatureList: FeatureItem[] = [
},
{
title: 'Customizable',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
description: (
<>
Reselect comes with fast defaults, but provides{' '}
Expand All @@ -49,7 +45,6 @@ const FeatureList: FeatureItem[] = [
},
{
title: 'Type-Safe',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
description: (
<>
Reselect is designed for <b>great TypeScript support</b>. Generated
Expand All @@ -59,12 +54,9 @@ const FeatureList: FeatureItem[] = [
}
]

const Feature: FC<FeatureItem> = memo(({ title, Svg, description }) => {
const Feature: FC<FeatureItem> = memo(({ title, description }) => {
return (
<div className={clsx('col col--3')}>
<div className="text--center">
{/* <Svg className={styles.featureSvg} role="img" /> */}
</div>
<div className="text--center padding-horiz--md">
<Heading as="h3">{title}</Heading>
<p>{description}</p>
Expand Down

0 comments on commit 355da53

Please sign in to comment.