Skip to content

Commit

Permalink
fix(website): rectify broken types
Browse files Browse the repository at this point in the history
  • Loading branch information
sabertazimi committed Dec 8, 2024
1 parent 2a06b24 commit ae16fa9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
17 changes: 9 additions & 8 deletions src/components/HomepageFeatures.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import clsx from 'clsx'
import React from 'react'
import MountainSVG from '../../static/img/undraw_docusaurus_mountain.svg'
import ReactSVG from '../../static/img/undraw_docusaurus_react.svg'
import TreeSVG from '../../static/img/undraw_docusaurus_tree.svg'
import styles from './HomepageFeatures.module.css'

type SVG = React.FunctionComponent<React.SVGProps<SVGSVGElement>>

const FeatureList = [
{
title: 'Powered by Markdown',
Svg: MountainSVG,
Svg: MountainSVG as unknown as SVG,
description: (
<>
Simply write notes with Markdown/MDX. Even embed JSX components into
Expand All @@ -18,7 +19,7 @@ const FeatureList = [
},
{
title: 'Built Using React',
Svg: TreeSVG,
Svg: TreeSVG as unknown as SVG,
description: (
<>
Extend or customize notes layout by reusing React. Notes can be extended
Expand All @@ -28,7 +29,7 @@ const FeatureList = [
},
{
title: 'Today I Learned',
Svg: ReactSVG,
Svg: ReactSVG as unknown as SVG,
description: (
<>
All notes come from everyday I learned. Deploy to both Github Pages and
Expand All @@ -39,14 +40,14 @@ const FeatureList = [
]

function Feature({ Svg, title, description }: {
Svg: React.FunctionComponent<React.SVGProps<SVGSVGElement>>
Svg: SVG
title: string
description: React.ReactNode
}): JSX.Element {
}): React.JSX.Element {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.feature} alt={title} />
<Svg className={styles.feature} />
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
Expand All @@ -56,7 +57,7 @@ function Feature({ Svg, title, description }: {
)
}

export default function HomepageFeatures(): JSX.Element {
export default function HomepageFeatures(): React.JSX.Element {
return (
<section className={styles.features}>
<div className="container">
Expand Down
5 changes: 2 additions & 3 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import Link from '@docusaurus/Link'
import useDocusaurusContext from '@docusaurus/useDocusaurusContext'
import Layout from '@theme/Layout'
import clsx from 'clsx'
import React from 'react'
import HomepageFeatures from '../components/HomepageFeatures'
import styles from './index.module.css'
import 'katex/dist/katex.css'

function HomepageHeader(): JSX.Element {
function HomepageHeader(): React.JSX.Element {
const { siteConfig } = useDocusaurusContext()

return (
Expand All @@ -25,7 +24,7 @@ function HomepageHeader(): JSX.Element {
)
}

export default function Home(): JSX.Element {
export default function Home(): React.JSX.Element {
const { siteConfig } = useDocusaurusContext()

return (
Expand Down

0 comments on commit ae16fa9

Please sign in to comment.