Skip to content

Commit

Permalink
fix: import static images with baseUrl path
Browse files Browse the repository at this point in the history
This is already provided by the classic template and in TypeScript
template wasn't updated.
  • Loading branch information
alias-mac committed Jan 15, 2022
1 parent 83e0413 commit 5080857
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import useBaseUrl from '@docusaurus/useBaseUrl';
import React from 'react';
import clsx from 'clsx';
import styles from './HomepageFeatures.module.css';
Expand Down Expand Up @@ -45,7 +46,11 @@ function Feature({title, image, description}: FeatureItem) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<img className={styles.featureSvg} alt={title} src={image} />
<img
className={styles.featureSvg}
alt={title}
src={useBaseUrl(image)}
/>
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import useBaseUrl from '@docusaurus/useBaseUrl';
import React from 'react';
import clsx from 'clsx';
import styles from './HomepageFeatures.module.css';
Expand Down Expand Up @@ -45,7 +46,11 @@ function Feature({title, image, description}: FeatureItem) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<img className={styles.featureSvg} alt={title} src={image} />
<img
className={styles.featureSvg}
alt={title}
src={useBaseUrl(image)}
/>
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
Expand Down

0 comments on commit 5080857

Please sign in to comment.