Skip to content

Commit a070ab9

Browse files
🐛 fix: Fix type
1 parent 8fd035c commit a070ab9

File tree

4 files changed

+40
-148
lines changed

4 files changed

+40
-148
lines changed

javascript/main.js

+22-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+14-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
import { FC } from 'react';
1+
import { memo, useMemo } from 'react';
22

33
import pkg from '@/../package.json';
44
import { ldModule } from '@/components/StructuredData/ld';
55

66
const TITLE = 'Stable Diffusion · LobeHub';
77
const DESC = pkg.description;
88

9-
const StructuredData: FC = () => {
10-
const ld = ldModule.generate({
11-
description: DESC,
12-
image:
13-
'https://repository-images.githubusercontent.com/606329910/7fd79db5-fd91-450c-9e95-8ccce8ffdc0b',
14-
title: TITLE,
15-
url: '/',
16-
});
9+
const StructuredData = memo(() => {
10+
const ld = useMemo(
11+
() =>
12+
ldModule.generate({
13+
description: DESC,
14+
image:
15+
'https://repository-images.githubusercontent.com/606329910/7fd79db5-fd91-450c-9e95-8ccce8ffdc0b',
16+
title: TITLE,
17+
url: '/',
18+
}),
19+
[],
20+
);
1721

1822
return (
1923
<script
@@ -22,5 +26,5 @@ const StructuredData: FC = () => {
2226
type="application/ld+json"
2327
/>
2428
);
25-
};
29+
});
2630
export default StructuredData;

src/features/Footer/Follow.tsx

+4-18
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { SiDiscord, SiGithub, SiMedium, SiX } from '@icons-pack/react-simple-ico
22
import { ActionIcon } from '@lobehub/ui';
33
import { createStyles } from 'antd-style';
44
import { memo } from 'react';
5-
import { useTranslation } from 'react-i18next';
65
import { Flexbox } from 'react-layout-kit';
76

87
import { DISCORD_URL, GITHUB_REPO_URL, MEDIDUM_URL, X } from '@/const/url';
@@ -25,32 +24,19 @@ const useStyles = createStyles(({ css, token }) => {
2524

2625
const Follow = memo(() => {
2726
const { styles } = useStyles();
28-
const { t } = useTranslation('common');
2927
return (
3028
<Flexbox gap={8} horizontal>
3129
<a href={GITHUB_REPO_URL} rel="noreferrer" target={'_blank'}>
32-
<ActionIcon
33-
className={styles.icon}
34-
icon={SiGithub as any}
35-
title={t('follow', { name: 'GitHub' })}
36-
/>
30+
<ActionIcon className={styles.icon} icon={SiGithub as any} title={'GitHub'} />
3731
</a>
3832
<a href={X} rel="noreferrer" target={'_blank'}>
39-
<ActionIcon className={styles.icon} icon={SiX as any} title={t('follow', { name: 'X' })} />
33+
<ActionIcon className={styles.icon} icon={SiX as any} title={'X / Twitter'} />
4034
</a>
4135
<a href={DISCORD_URL} rel="noreferrer" target={'_blank'}>
42-
<ActionIcon
43-
className={styles.icon}
44-
icon={SiDiscord as any}
45-
title={t('follow', { name: 'Discord' })}
46-
/>
36+
<ActionIcon className={styles.icon} icon={SiDiscord as any} title={'Discord'} />
4737
</a>
4838
<a href={MEDIDUM_URL} rel="noreferrer" target={'_blank'}>
49-
<ActionIcon
50-
className={styles.icon}
51-
icon={SiMedium as any}
52-
title={t('follow', { name: 'Medium' })}
53-
/>
39+
<ActionIcon className={styles.icon} icon={SiMedium as any} title={'Medium'} />
5440
</a>
5541
</Flexbox>
5642
);

src/store/action.test.ts

-98
This file was deleted.

0 commit comments

Comments
 (0)