Skip to content

Commit

Permalink
site: optimization type & props (ant-design#43433)
Browse files Browse the repository at this point in the history
* chore: optimization type & props

* fix: remove useless type
  • Loading branch information
thinkasany authored Jul 7, 2023
1 parent 266e60a commit 0d31270
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .dumi/theme/builtins/Previewer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import type { FC } from 'react';
import React from 'react';
import type { IPreviewerProps } from 'dumi';
import { useTabMeta } from 'dumi';
import React from 'react';
import CodePreviewer from './CodePreviewer';
import DesignPreviewer from './DesignPreviewer';

export interface AntdPreviewerProps extends IPreviewerProps {
originDebug?: IPreviewerProps['debug'];
}

const Previewer: FC<AntdPreviewerProps> = ({ ...props }) => {
const Previewer: React.FC<AntdPreviewerProps> = (props) => {
const tab = useTabMeta();

if (tab?.frontmatter.title === 'Design') {
Expand Down
2 changes: 1 addition & 1 deletion .dumi/theme/common/ThemeSwitch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type ThemeSwitchProps = {
onChange: (value: ThemeName[]) => void;
};

const ThemeSwitch: React.FC<ThemeSwitchProps> = (props: ThemeSwitchProps) => {
const ThemeSwitch: React.FC<ThemeSwitchProps> = (props) => {
const { value = ['light'], onChange } = props;
const { token } = useSiteToken();
const { pathname, search } = useLocation();
Expand Down

0 comments on commit 0d31270

Please sign in to comment.