-
-
-
diff --git a/packages/next-web/pages/app/[id]/functions/mods/DependecePanel/index.module.scss b/packages/next-web/pages/app/[id]/functions/mods/DependecePanel/index.module.scss
index 48e0e34d86..aa848afa2f 100644
--- a/packages/next-web/pages/app/[id]/functions/mods/DependecePanel/index.module.scss
+++ b/packages/next-web/pages/app/[id]/functions/mods/DependecePanel/index.module.scss
@@ -6,7 +6,7 @@
padding: 2px 8px;
&:hover {
- background-color: #f2f3f8;
+ background-color: #F2F3F8;
}
}
}
diff --git a/packages/next-web/pages/app/[id]/functions/mods/DependecePanel/index.tsx b/packages/next-web/pages/app/[id]/functions/mods/DependecePanel/index.tsx
index 29b72d5c32..bc559d3d6f 100644
--- a/packages/next-web/pages/app/[id]/functions/mods/DependecePanel/index.tsx
+++ b/packages/next-web/pages/app/[id]/functions/mods/DependecePanel/index.tsx
@@ -2,12 +2,12 @@
* cloud functions list sidebar
***************************/
-import React from "react";
import { AttachmentIcon, WarningIcon } from "@chakra-ui/icons";
import { HStack, Input } from "@chakra-ui/react";
+import React from "react";
-import commonStyles from "../../index.module.scss";
import styles from "./index.module.scss";
+import commonStyles from "../../index.module.scss";
export default function DependecyList() {
return (
diff --git a/packages/next-web/pages/app/[id]/functions/mods/DependecyList/index.module.scss b/packages/next-web/pages/app/[id]/functions/mods/DependecyList/index.module.scss
deleted file mode 100644
index aa848afa2f..0000000000
--- a/packages/next-web/pages/app/[id]/functions/mods/DependecyList/index.module.scss
+++ /dev/null
@@ -1,12 +0,0 @@
-.functionList {
- li {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 2px 8px;
-
- &:hover {
- background-color: #F2F3F8;
- }
- }
-}
diff --git a/packages/next-web/pages/app/[id]/functions/mods/DependecyList/index.tsx b/packages/next-web/pages/app/[id]/functions/mods/DependecyList/index.tsx
deleted file mode 100644
index f74b36f8c3..0000000000
--- a/packages/next-web/pages/app/[id]/functions/mods/DependecyList/index.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************
- * cloud functions list sidebar
- ***************************/
-
-import {
- AddIcon,
- AttachmentIcon,
- HamburgerIcon,
- SettingsIcon,
- SunIcon,
- WarningIcon,
-} from "@chakra-ui/icons";
-import { Input } from "@chakra-ui/react";
-import React from "react";
-
-import styles from "./index.module.scss";
-import commonStyles from "../../index.module.scss";
-
-export default function DependecyList() {
- return (
-
-
-
NPM 依赖
-
-
-
-
-
-
-
-
- );
-}
diff --git a/packages/next-web/pages/app/[id]/functions/mods/FunctionList/index.module.scss b/packages/next-web/pages/app/[id]/functions/mods/FunctionList/index.module.scss
deleted file mode 100644
index aa848afa2f..0000000000
--- a/packages/next-web/pages/app/[id]/functions/mods/FunctionList/index.module.scss
+++ /dev/null
@@ -1,12 +0,0 @@
-.functionList {
- li {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 2px 8px;
-
- &:hover {
- background-color: #F2F3F8;
- }
- }
-}
diff --git a/packages/next-web/pages/app/[id]/functions/mods/FunctionList/index.tsx b/packages/next-web/pages/app/[id]/functions/mods/FunctionList/index.tsx
deleted file mode 100644
index 0b000062d1..0000000000
--- a/packages/next-web/pages/app/[id]/functions/mods/FunctionList/index.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************
- * cloud functions list sidebar
- ***************************/
-
-import {
- AddIcon,
- AttachmentIcon,
- HamburgerIcon,
- SettingsIcon,
- SunIcon,
- WarningIcon,
-} from "@chakra-ui/icons";
-import { Input } from "@chakra-ui/react";
-import React from "react";
-
-import styles from "./index.module.scss";
-import commonStyles from "../../index.module.scss";
-
-export default function FunctionList() {
- return (
-
-
-
-
-
-
-
-
-
我的收藏
-
- -
-
-
M
-
- - antDirt.js
- - getUser.js
- - getQrCode.js
- - getUserInfo.js
- - helloWorld.js
-
-
-
所有函数
-
- - addToto.js
- - antDirt.js
- - getUser.js
- - getQrCode.js
- - getUserInfo.js
- - helloWorld.js
-
-
- );
-}
diff --git a/packages/next-web/pages/app/[id]/functions/mods/FunctionPanel/index.tsx b/packages/next-web/pages/app/[id]/functions/mods/FunctionPanel/index.tsx
index 13d040ee75..eeeee19fa7 100644
--- a/packages/next-web/pages/app/[id]/functions/mods/FunctionPanel/index.tsx
+++ b/packages/next-web/pages/app/[id]/functions/mods/FunctionPanel/index.tsx
@@ -2,8 +2,8 @@
* cloud functions list sidebar
***************************/
-import React from "react";
import {
+ AddIcon,
AttachmentIcon,
HamburgerIcon,
SettingsIcon,
@@ -11,13 +11,13 @@ import {
WarningIcon,
} from "@chakra-ui/icons";
import { HStack, Input } from "@chakra-ui/react";
+import React from "react";
+import styles from "./index.module.scss";
+import commonStyles from "../../index.module.scss";
import useFunctionStore from "../../store";
import CreateModal from "../CreateModal";
-import commonStyles from "../../index.module.scss";
-import styles from "./index.module.scss";
-
export default function FunctionList() {
const store = useFunctionStore((store) => store);
diff --git a/packages/next-web/pages/app/[id]/functions/store.ts b/packages/next-web/pages/app/[id]/functions/store.ts
index 08a3e1d497..9d7d51b1bd 100644
--- a/packages/next-web/pages/app/[id]/functions/store.ts
+++ b/packages/next-web/pages/app/[id]/functions/store.ts
@@ -65,8 +65,8 @@ const useFunctionStore = create
()(
state.currentFunction = currentFunction;
return state;
}),
- })),
- ),
+ }))
+ )
);
export default useFunctionStore;
diff --git a/packages/next-web/pnpm-lock.yaml b/packages/next-web/pnpm-lock.yaml
index 1458c84378..cab3452454 100644
--- a/packages/next-web/pnpm-lock.yaml
+++ b/packages/next-web/pnpm-lock.yaml
@@ -18,6 +18,7 @@ specifiers:
eslint: 8.26.0
eslint-config-next: 12.3.1
framer-motion: ^6
+ immer: ^9.0.16
next: 12.3.1
postcss: ^8.4.18
react: 18.2.0
@@ -25,6 +26,7 @@ specifiers:
sass: ^1.55.0
tailwindcss: ^3.2.1
typescript: 4.8.4
+ zustand: ^4.1.4
dependencies:
'@chakra-ui/icons': 2.0.11_react@18.2.0
@@ -38,10 +40,12 @@ dependencies:
'@tanstack/react-query': 4.14.1_biqbaboplfbrettd7655fr4n2y
axios: 1.1.3
framer-motion: 6.5.1_biqbaboplfbrettd7655fr4n2y
+ immer: 9.0.16
next: 12.3.1_2mygebwfgdyopr3fy2qddu2eli
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
sass: 1.55.0
+ zustand: 4.1.4_immer@9.0.16+react@18.2.0
devDependencies:
'@types/node': 18.11.7
@@ -3174,6 +3178,10 @@ packages:
engines: {node: '>= 4'}
dev: true
+ /immer/9.0.16:
+ resolution: {integrity: sha512-qenGE7CstVm1NrHQbMh8YaSzTZTFNP3zPqr3YU0S0UY441j4bJTg4A2Hh5KAhwgaiU6ZZ1Ar6y/2f4TblnMReQ==}
+ dev: false
+
/immutable/4.1.0:
resolution: {integrity: sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==}
dev: false
@@ -4706,3 +4714,20 @@ packages:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
dev: true
+
+ /zustand/4.1.4_immer@9.0.16+react@18.2.0:
+ resolution: {integrity: sha512-k2jVOlWo8p4R83mQ+/uyB8ILPO2PCJOf+QVjcL+1PbMCk1w5OoPYpAIxy9zd93FSfmJqoH6lGdwzzjwqJIRU5A==}
+ engines: {node: '>=12.7.0'}
+ peerDependencies:
+ immer: '>=9.0'
+ react: '>=16.8'
+ peerDependenciesMeta:
+ immer:
+ optional: true
+ react:
+ optional: true
+ dependencies:
+ immer: 9.0.16
+ react: 18.2.0
+ use-sync-external-store: 1.2.0_react@18.2.0
+ dev: false