Skip to content

Commit

Permalink
Fixed wiki list export items warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ihavecoke committed Jun 18, 2024
1 parent 19f8f86 commit bffd971
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/wiki-list/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { FC } from 'react';

import { items as featuredItems } from '@site/featured-items.json';
import featureConfig from '@site/featured-items.json';
import { WikiUtils } from '@site/scripts/wiki/wiki-utils';
import { useBasenameLocale } from '@site/src/utils';
import { useBasenameLocale } from "@site/src/utils";
import wikis from '@site/home-page.config.json';
import './style.scss';

const itemName = (item: any) =>
item.name_locales['zh-CN'] || item.name_locales['en'];

const featuredItems = Array.from(featureConfig.items || []);
const featuredWikis = wikis.filter((item) =>
featuredItems.includes(itemName(item))
);
Expand All @@ -21,6 +22,7 @@ featuredWikis.sort((a, b) => {

export const WikiList: FC = () => {
const locale = useBasenameLocale();

return (
<ul className="wiki-list">
{featuredWikis.map((rawWiki: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/theme/DocRoot/Layout/Main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function DocRootLayoutMain({
)}>
<div
className={clsx(
'container sm:px-4 md:px-0 mt-8 padding-top--md padding-bottom--lg',
'container sm:px-4 md:px-0 wiki-article-content mt-8 padding-top--md padding-bottom--lg',
styles.docItemWrapper,
hiddenSidebarContainer && styles.docItemWrapperEnhanced,
)}>
Expand Down

0 comments on commit bffd971

Please sign in to comment.