Skip to content

Commit

Permalink
🐛 fix: Fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed May 15, 2024
1 parent 8fd035c commit a070ab9
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 148 deletions.
44 changes: 22 additions & 22 deletions javascript/main.js

Large diffs are not rendered by default.

24 changes: 14 additions & 10 deletions src/components/StructuredData/index.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import { FC } from 'react';
import { memo, useMemo } from 'react';

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

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

const StructuredData: FC = () => {
const ld = ldModule.generate({
description: DESC,
image:
'https://repository-images.githubusercontent.com/606329910/7fd79db5-fd91-450c-9e95-8ccce8ffdc0b',
title: TITLE,
url: '/',
});
const StructuredData = memo(() => {
const ld = useMemo(
() =>
ldModule.generate({
description: DESC,
image:
'https://repository-images.githubusercontent.com/606329910/7fd79db5-fd91-450c-9e95-8ccce8ffdc0b',
title: TITLE,
url: '/',
}),
[],
);

return (
<script
Expand All @@ -22,5 +26,5 @@ const StructuredData: FC = () => {
type="application/ld+json"
/>
);
};
});
export default StructuredData;
22 changes: 4 additions & 18 deletions src/features/Footer/Follow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { SiDiscord, SiGithub, SiMedium, SiX } from '@icons-pack/react-simple-ico
import { ActionIcon } from '@lobehub/ui';
import { createStyles } from 'antd-style';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { Flexbox } from 'react-layout-kit';

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

const Follow = memo(() => {
const { styles } = useStyles();
const { t } = useTranslation('common');
return (
<Flexbox gap={8} horizontal>
<a href={GITHUB_REPO_URL} rel="noreferrer" target={'_blank'}>
<ActionIcon
className={styles.icon}
icon={SiGithub as any}
title={t('follow', { name: 'GitHub' })}
/>
<ActionIcon className={styles.icon} icon={SiGithub as any} title={'GitHub'} />
</a>
<a href={X} rel="noreferrer" target={'_blank'}>
<ActionIcon className={styles.icon} icon={SiX as any} title={t('follow', { name: 'X' })} />
<ActionIcon className={styles.icon} icon={SiX as any} title={'X / Twitter'} />
</a>
<a href={DISCORD_URL} rel="noreferrer" target={'_blank'}>
<ActionIcon
className={styles.icon}
icon={SiDiscord as any}
title={t('follow', { name: 'Discord' })}
/>
<ActionIcon className={styles.icon} icon={SiDiscord as any} title={'Discord'} />
</a>
<a href={MEDIDUM_URL} rel="noreferrer" target={'_blank'}>
<ActionIcon
className={styles.icon}
icon={SiMedium as any}
title={t('follow', { name: 'Medium' })}
/>
<ActionIcon className={styles.icon} icon={SiMedium as any} title={'Medium'} />
</a>
</Flexbox>
);
Expand Down
98 changes: 0 additions & 98 deletions src/store/action.test.ts

This file was deleted.

0 comments on commit a070ab9

Please sign in to comment.