Skip to content

Commit 0774b7c

Browse files
author
wangqian
committed
fix: 默认导出
1 parent d37a08c commit 0774b7c

File tree

10 files changed

+35
-16
lines changed

10 files changed

+35
-16
lines changed

components/footer/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface IFooterProps {
2828
publicNumber: string; // 公安备案号
2929
}
3030

31-
export const Footer: FC<IFooterProps> = ({
31+
const Footer: FC<IFooterProps> = ({
3232
title,
3333
linkList,
3434
qrCode,
@@ -110,3 +110,5 @@ export const Footer: FC<IFooterProps> = ({
110110
</div>
111111
);
112112
};
113+
114+
export default Footer;

components/layout/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import {FC} from "react";
2-
import {Footer, IFooterProps} from "../footer/index";
3-
import {INavBarProps, NavBar} from "../navbar/index";
2+
import type {IFooterProps} from "../footer/index";
3+
import Footer from "../footer/index";
4+
import type {INavBarProps} from "../navbar/index";
5+
import NavBar from "../navbar/index";
46
import styles from "./styles.module.scss";
57

68
export interface ILayoutProps {
79
navbarData: INavBarProps;
810
footerData: IFooterProps;
911
}
1012

11-
export const Layout: FC<ILayoutProps & { children: JSX.Element }> = ({
13+
const Layout: FC<ILayoutProps & { children: JSX.Element }> = ({
1214
navbarData,
1315
footerData,
1416
children,
@@ -21,3 +23,5 @@ export const Layout: FC<ILayoutProps & { children: JSX.Element }> = ({
2123
</div>
2224
);
2325
};
26+
27+
export default Layout;

components/navbar/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {Themes} from "@/constants/enum";
1111
export interface INavBarProps {
1212
}
1313

14-
export const NavBar: FC<INavBarProps> = ({}) => {
14+
const NavBar: FC<INavBarProps> = ({}) => {
1515
const {setTheme, theme} = useContext(ThemeContext);
1616
const icon = theme === Themes.light ? logoTextDark : logoText;
1717
const iconTheme = theme === Themes.light ? <IconMoon size="extra-large"/> : <IconSun size="extra-large"/>;
@@ -47,3 +47,5 @@ export const NavBar: FC<INavBarProps> = ({}) => {
4747
</div>
4848
);
4949
};
50+
51+
export default NavBar;

pages/_app.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import type {AppContext, AppProps} from 'next/app';
22
import App from 'next/app';
33
import React from 'react';
4-
import {ILayoutProps, Layout} from '@/components/layout';
4+
import type {ILayoutProps} from '@/components/layout';
5+
import Layout from '@/components/layout';
56
import Head from 'next/head';
67
import {getIsMobile, getIsSupportWebp} from '@/utils';
78
import {ThemeContextProvider} from '@/stores/theme';

pages/components/banner/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {ThemeContext} from "@/stores/theme";
1111
export interface IBannerProps {
1212
}
1313

14-
export const Banner: FC<IBannerProps> = ({}) => {
14+
const Banner: FC<IBannerProps> = ({}) => {
1515
const mainRef = useRef<HTMLDivElement>(null);
1616
const {theme} = useContext(ThemeContext);
1717

@@ -47,3 +47,5 @@ export const Banner: FC<IBannerProps> = ({}) => {
4747
</div>
4848
);
4949
};
50+
51+
export default Banner;

pages/components/contributors/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import styles from "./styles.module.scss";
55
export interface IContributorsProps {
66
}
77

8-
export const Contributors: FC<IContributorsProps> = ({}) => {
8+
const Contributors: FC<IContributorsProps> = ({}) => {
99
return (
1010
<div className={styles.contributorsContainer}>
1111
<Row className={styles.row} type="flex" align="middle">
@@ -25,3 +25,5 @@ export const Contributors: FC<IContributorsProps> = ({}) => {
2525
</div>
2626
);
2727
};
28+
29+
export default Contributors;

pages/components/features/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import InformationIcon from "@/public/information.svg";
99
export interface IFeaturesProps {
1010
}
1111

12-
export const Features: FC<IFeaturesProps> = ({}) => {
12+
const Features: FC<IFeaturesProps> = ({}) => {
1313
const Options = [{
1414
icon: SafetyIcon,
1515
title: '安全'
@@ -41,3 +41,5 @@ export const Features: FC<IFeaturesProps> = ({}) => {
4141
</div>
4242
);
4343
};
44+
45+
export default Features;

pages/components/platform/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import styles from "./styles.module.scss";
1111
export interface IPlatformProps {
1212
}
1313

14-
export const Platform: FC<IPlatformProps> = ({}) => {
14+
const Platform: FC<IPlatformProps> = ({}) => {
1515
const popupRef = useRef<IPopupRef>(null);
1616
const [currentImage, setCurrentImage] = useState(null)
1717
const Options = [{
@@ -62,3 +62,5 @@ export const Platform: FC<IPlatformProps> = ({}) => {
6262
</div>
6363
);
6464
};
65+
66+
export default Platform;

pages/components/technology/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import styles from "./styles.module.scss";
66
export interface ITechnologyProps {
77
}
88

9-
export const Technology: FC<ITechnologyProps> = ({}) => {
9+
const Technology: FC<ITechnologyProps> = ({}) => {
1010
const Options = [{
1111
title: '数字孪生',
1212
description: '通过服务侧、客户端侧属性、遥测数据、RPC 等实现了数字孪生, 实现了所有设备统一接口提供给业务调用。',
@@ -45,3 +45,5 @@ export const Technology: FC<ITechnologyProps> = ({}) => {
4545
</div>
4646
);
4747
};
48+
49+
export default Technology;

pages/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React, {useContext, useEffect, useRef} from 'react';
22
import type {NextPage} from 'next';
33
import styles from './index.module.scss';
4-
import {Banner} from "@/pages/components/banner";
5-
import {Technology} from "@/pages/components/technology";
6-
import {Features} from "@/pages/components/features";
7-
import {Platform} from "@/pages/components/platform";
8-
import {Contributors} from "@/pages/components/contributors";
4+
import Banner from "@/pages/components/banner";
5+
import Technology from "@/pages/components/technology";
6+
import Features from "@/pages/components/features";
7+
import Platform from "@/pages/components/platform";
8+
import Contributors from "@/pages/components/contributors";
99
import cName from 'classnames';
1010
import {ThemeContext} from '@/stores/theme';
1111
import {IComponentProps} from './_app';

0 commit comments

Comments
 (0)