Skip to content

Commit aaa104a

Browse files
committed
feat: 官网调整
1 parent 9a1a451 commit aaa104a

File tree

22 files changed

+49
-162
lines changed

22 files changed

+49
-162
lines changed

components/footer/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import styles from "./styles.module.scss";
55
import cName from "classnames";
66
import {isEmpty} from "lodash";
77
import QRCode from "@/public/code.jpg";
8-
import { useTranslation } from 'next-i18next'
98
interface ILink {
109
label: string;
1110
link?: string;
@@ -24,7 +23,6 @@ interface IQRCode {
2423
export interface IFooterProps {}
2524

2625
const Footer: FC<IFooterProps> = ({}) => {
27-
const { t } = useTranslation('footer');
2826
const data = {
2927
"title": "IoTSharp",
3028
"qr_code": "",
@@ -52,7 +50,7 @@ const Footer: FC<IFooterProps> = ({}) => {
5250
"link_lists": {
5351
"data": [
5452
{
55-
"title": t('about'),
53+
"title": '关于',
5654
"links": {
5755
"data": [
5856
{

components/layout/index.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import {FC} from "react";
22
import type {IFooterProps} from "../footer/index";
3-
import Footer from "../footer/index";
43
import type {INavBarProps} from "../navbar/index";
5-
import NavBar from "../navbar/index";
64
import styles from "./styles.module.scss";
75

86
export interface ILayoutProps {
@@ -11,8 +9,6 @@ export interface ILayoutProps {
119
}
1210

1311
const Layout: FC<ILayoutProps & { children: JSX.Element }> = ({
14-
navbarData,
15-
footerData,
1612
children,
1713
}) => {
1814
return (

next.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
const path = require("path");
22

33
const semi = require("@douyinfe/semi-next").default({});
4-
const { i18n } = require('./next-i18next.config')
54
module.exports = semi({
65
reactStrictMode: true,
76
swcMinify: true,
8-
i18n,
97
webpack: (config) => {
108
config.resolve.alias = {
119
...config.resolve.alias,

package-lock.json

Lines changed: 16 additions & 118 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@
1515
"ahooks": "^3.7.4",
1616
"axios": "^0.27.2",
1717
"classnames": "^2.3.1",
18-
"i18next": "^22.4.6",
1918
"lodash": "^4.17.21",
2019
"next": "13.1.1",
2120
"next-connect": "^0.13.0",
22-
"next-i18next": "^13.0.2",
2321
"react": "^18.2.0",
2422
"react-dom": "^18.2.0",
2523
"react-i18next": "^12.1.1",

pages/_app.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ import {getIsMobile, getIsSupportWebp} from '@/utils';
88
import {ThemeContextProvider} from '@/stores/theme';
99
import {UserAgentProvider} from '@/stores/userAgent';
1010
import {LanguageContextProvider} from '@/stores/language';
11-
import QRCode from '@/public/code.jpg';
1211
import './global.scss';
13-
import {isEmpty} from "lodash";
14-
import {appWithTranslation} from 'next-i18next'
1512

1613
export interface IComponentProps {
1714
isMobile?: boolean;
@@ -52,4 +49,4 @@ MyApp.getInitialProps = async (context: AppContext) => {
5249
};
5350
};
5451

55-
export default appWithTranslation(MyApp);
52+
export default MyApp;

pages/_document.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import {Head, Html, Main, NextScript} from 'next/document';
22
import Script from 'next/script';
33
import React from 'react';
44

5-
export default function Document(): JSX.Element {
5+
export default function Document() {
66
return (
77
<Html>
88
<Head/>
99
<body>
10-
<Main/>
11-
<NextScript/>
12-
<Script id="theme-script" strategy="beforeInteractive">
13-
{`const item = localStorage.getItem('theme') || 'light';
14-
localStorage.setItem('theme', item);
15-
document.getElementsByTagName('html')[0].dataset.theme = item;`}
16-
</Script>
10+
<Main/>
11+
<NextScript/>
12+
<Script id="theme-script" strategy="beforeInteractive">
13+
{`const item = localStorage.getItem('theme') || 'light';
14+
localStorage.setItem('theme', item);
15+
document.getElementsByTagName('html')[0].dataset.theme = item;`}
16+
</Script>
1717
</body>
1818
</Html>
1919
);

pages/components/banner/styles.module.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@
123123
}
124124

125125
.banner {
126-
margin-top: -4rem;
127126
width: 100%;
128127
padding: 12rem 8rem;
129128
background: url("/img.png");

0 commit comments

Comments
 (0)