diff --git a/.eslintrc.json b/.eslintrc.json index ca4b8e9..c7458b8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,10 @@ { - "extends": ["next/core-web-vitals", "next/typescript"], + "extends": [ + "next/core-web-vitals", + "next/typescript" + ], "rules": { - "@next/next/no-img-element": "off" // 或者 "error",取决于你希望是警告还是错误 + "@next/next/no-img-element": "off", // 或者 "error",取决于你希望是警告还是错误 + "react-hooks/rules-of-hooks": "off" } -} +} \ No newline at end of file diff --git a/example.json b/example.json new file mode 100644 index 0000000..8b0aa07 --- /dev/null +++ b/example.json @@ -0,0 +1,42 @@ +[ + { + "exampleName": "测试", + "icon": "https://www-soyootech.oss-cn-hangzhou.aliyuncs.com/exampleIcon/20241023-13_02_05.jpg", + "url": "http://preview.soyootech.com/temp/A.html" + }, + { + "exampleName": "测试", + "icon": "https://www-soyootech.oss-cn-hangzhou.aliyuncs.com/exampleIcon/20241023-13_02_05.jpg", + "url": "http://preview.soyootech.com/temp/B.html" + }, + { + "exampleName": "测试", + "icon": "https://www-soyootech.oss-cn-hangzhou.aliyuncs.com/exampleIcon/20241023-13_02_05.jpg", + "url": "http://preview.soyootech.com/temp/A.html" + }, + { + "exampleName": "测试", + "icon": "https://www-soyootech.oss-cn-hangzhou.aliyuncs.com/exampleIcon/20241023-13_02_05.jpg", + "url": "http://preview.soyootech.com/temp/A.html" + }, + { + "exampleName": "测试", + "icon": "https://www-soyootech.oss-cn-hangzhou.aliyuncs.com/exampleIcon/20241023-13_02_05.jpg", + "url": "http://preview.soyootech.com/temp/A.html" + }, + { + "exampleName": "测试", + "icon": "https://www-soyootech.oss-cn-hangzhou.aliyuncs.com/exampleIcon/20241023-13_02_05.jpg", + "url": "http://preview.soyootech.com/temp/A.html" + }, + { + "exampleName": "测试", + "icon": "https://www-soyootech.oss-cn-hangzhou.aliyuncs.com/exampleIcon/20241023-13_02_05.jpg", + "url": "http://preview.soyootech.com/temp/A.html" + }, + { + "exampleName": "测试", + "icon": "https://www-soyootech.oss-cn-hangzhou.aliyuncs.com/exampleIcon/20241023-13_02_05.jpg", + "url": "http://preview.soyootech.com/temp/A.html" + } +] \ No newline at end of file diff --git a/postcss.config.mjs b/postcss.config.mjs index 482f85b..f734f43 100644 --- a/postcss.config.mjs +++ b/postcss.config.mjs @@ -1,4 +1,3 @@ -import postcssPxtorem from 'postcss-pxtorem'; /** @type {import('postcss-load-config').Config} */ const config = { diff --git a/src/app/[[...lang]]/components/more.tsx b/src/app/[[...lang]]/components/more.tsx deleted file mode 100644 index c1f415a..0000000 --- a/src/app/[[...lang]]/components/more.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import Link from "next/link" - -export default function More(props: {dict: Record, lang: string[]}) { - const { dict } = props - return <> - - -
-
{ dict.seeMore }
-
{ dict.contactUs1 }
-
- - - -} \ No newline at end of file diff --git a/src/app/[[...lang]]/page.tsx b/src/app/[[...lang]]/page.tsx index 4c9ba8b..59aabbd 100644 --- a/src/app/[[...lang]]/page.tsx +++ b/src/app/[[...lang]]/page.tsx @@ -1,219 +1,124 @@ - - - - - -import { getDictionary } from '@/dictionaries'; +import { getDictionary } from "@/dictionaries"; import Form from "./components/form"; import Header from "@/app/components/header"; import Footer from "@/app/components/footer"; -import More from './components/more'; + +import Examples from "../components/Examples"; type CaseType = { - img: string -} + img: string; +}; export type PropsType = { - params: { - lang: string[]; - }; -} + params: { + lang: string[]; + caseList: CaseType[]; + }; +}; +export default async function Home(props: { params: { lang: string[] }; caseList: CaseType[] }) { + const lang = props.params.lang || ["zh"]; + const dict = await getDictionary(lang[0]); -export default async function Home (props: PropsType) { - const lang = props.params.lang || ['zh']; - const dict = await getDictionary(lang[0]); - const caseList: CaseType[] = [ - { img: '/home/case_1.png' }, - { img: '/home/case_2.png' }, - { img: '/home/case_3.png' }, - { img: '/home/case_3.png' }, - { img: '/home/case_1.png' }, - { img: '/home/case_2.png' }, - { img: '/home/case_3.png' }, - { img: '/home/case_3.png' }, - { img: '/home/case_1.png' }, - { img: '/home/case_2.png' }, - { img: '/home/case_3.png' }, - { img: '/home/case_3.png' }, - { img: '/home/case_1.png' }, - { img: '/home/case_2.png' }, - { img: '/home/case_3.png' }, - ] - return <> -
-
-
-
-
- -
-
- {dict.FocusingOnPlayableAds} -
-
- {dict.goOverseas} -
-
-
-
- -
- { dict.customized } -
-
- -
- -
- { dict.ABTesting} -
-
- { dict.iterateGameplay } -
-
-
- -
- { dict.multiLanguage } -
-
- { dict.breakingGeographical } -
-
-
- -
- { dict.allChannel } -
-
- { dict.expandInfluence } -
-
- -
- -
- { dict.lightweightDeployment } -
- -
- { dict.simplifyProcess } -
-
-
- -
{ dict.caseGallery }
- {/*
{ dict.clickNow }
*/} - -
- -
- { - caseList.map((item: CaseType, index: number) => { - return
-
- -
- {dict.clickToPlay} -
-
- -
- }) - } -
- -
-
- - -
-
{ dict.contactUs }
-
-
-
-
-
- { dict.businessCooperation }info@soyootech.com -
-
-