From 3ae3bff8f1322ebbe326e63309f04cea8d1abfa0 Mon Sep 17 00:00:00 2001
From: zhaoxinxin <1186037180@qq.com>
Date: Fri, 6 Dec 2024 11:47:16 +0800
Subject: [PATCH 1/3] feat: change e2e ci
Signed-off-by: zhaoxinxin <1186037180@qq.com>
---
.github/workflows/e2e.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml
index 34df3419..fb80f34b 100644
--- a/.github/workflows/e2e.yaml
+++ b/.github/workflows/e2e.yaml
@@ -12,7 +12,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
- node-version: '18.x'
+ node-version: '20.x'
- name: Install dependencies
run: yarn install --force
From 10e5812dfcace8d7263344ff991903a75b021de3 Mon Sep 17 00:00:00 2001
From: zhaoxinxin <1186037180@qq.com>
Date: Fri, 6 Dec 2024 12:08:59 +0800
Subject: [PATCH 2/3] feat: change e2e ci
Signed-off-by: zhaoxinxin <1186037180@qq.com>
---
src/components/rotation.tsx | 64 +++++++++++++++++--------------------
1 file changed, 30 insertions(+), 34 deletions(-)
diff --git a/src/components/rotation.tsx b/src/components/rotation.tsx
index 40d61d01..f0a66e96 100644
--- a/src/components/rotation.tsx
+++ b/src/components/rotation.tsx
@@ -49,41 +49,37 @@ export default function Rotation() {
onChangeIndex={handleStepChange}
enableMouseEvents
>
- {imageList.map((step, index) => {
- return (
-
- );
- })}
+ {imageList.map((step, index) => (
+
+ {Math.abs(imageIndex - index) <= 2 ? (
+
+ ) : null}
+
+ ))}
- {
-
- }
+
);
From fed5272b3f41d09be9eda0397685a68f7cdd375d Mon Sep 17 00:00:00 2001
From: zhaoxinxin <1186037180@qq.com>
Date: Fri, 6 Dec 2024 12:25:35 +0800
Subject: [PATCH 3/3] feat: change e2e ci
Signed-off-by: zhaoxinxin <1186037180@qq.com>
---
.github/workflows/e2e.yaml | 2 +-
src/components/rotation.tsx | 42 +++++++++++++++++++------------------
tsconfig.json | 19 ++++++-----------
3 files changed, 29 insertions(+), 34 deletions(-)
diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml
index fb80f34b..34df3419 100644
--- a/.github/workflows/e2e.yaml
+++ b/.github/workflows/e2e.yaml
@@ -12,7 +12,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
- node-version: '20.x'
+ node-version: '18.x'
- name: Install dependencies
run: yarn install --force
diff --git a/src/components/rotation.tsx b/src/components/rotation.tsx
index f0a66e96..7c6bf644 100644
--- a/src/components/rotation.tsx
+++ b/src/components/rotation.tsx
@@ -1,7 +1,7 @@
import { Box, Grid, MobileStepper, ThemeProvider, createTheme } from '@mui/material';
import { useState } from 'react';
-import { autoPlay } from 'react-swipeable-views-utils';
import SwipeableViews from 'react-swipeable-views';
+import { autoPlay } from 'react-swipeable-views-utils';
const AutoPlaySwipeableViews = autoPlay(SwipeableViews);
@@ -49,22 +49,24 @@ export default function Rotation() {
onChangeIndex={handleStepChange}
enableMouseEvents
>
- {imageList.map((step, index) => (
-
- {Math.abs(imageIndex - index) <= 2 ? (
-
- ) : null}
-
- ))}
+ {imageList.map((step, index) => {
+ return (
+
+ );
+ })}
diff --git a/tsconfig.json b/tsconfig.json
index 658f8422..88a16edf 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,15 +1,11 @@
{
"compilerOptions": {
"target": "es5",
- "lib": [
- "dom",
- "dom.iterable",
- "esnext"
- ],
- "types": [
- "cypress",
- "node"
- ],
+ "lib": ["dom", "dom.iterable", "esnext"],
+ "types": ["cypress", "node"],
+ "paths": {
+ "react": ["./node_modules/@types/react"]
+ },
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
@@ -24,8 +20,5 @@
"noEmit": true,
"jsx": "react-jsx"
},
- "include": [
- "src",
- "**/*.ts"
- ]
+ "include": ["src", "**/*.ts"]
}