Skip to content

Commit 4cd3e0e

Browse files
committed
fix test error
1 parent 613bb01 commit 4cd3e0e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

client/modules/IDE/components/FileNode.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ const FileNode = ({
9393
const { t } = useTranslation();
9494
const fileNameInput = useRef(null);
9595
const fileOptionsRef = useRef(null);
96-
const dispatch = useDispatch();
9796

9897
const handleFileClick = (event) => {
9998
event.stopPropagation();

client/modules/IDE/components/SketchList.unit.test.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import configureStore from 'redux-mock-store';
33
import thunk from 'redux-thunk';
4+
import { useTranslation } from 'react-i18next';
45
import { setupServer } from 'msw/node';
56
import { rest } from 'msw';
67
import { act } from 'react-dom/test-utils';
@@ -26,8 +27,9 @@ afterAll(() => server.close());
2627
describe('<Sketchlist />', () => {
2728
const mockStore = configureStore([thunk]);
2829
const store = mockStore(initialTestState);
30+
const { t } = useTranslation();
2931

30-
let subjectProps = { username: initialTestState.user.username };
32+
let subjectProps = { username: initialTestState.user.username, t };
3133

3234
const subject = () =>
3335
reduxRender(<SketchList {...subjectProps} />, { store });

client/modules/User/pages/DashboardView.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,12 @@ const DashboardView = () => {
107107
case TabKey.sketches:
108108
default:
109109
return (
110-
<SketchList key={username} mobile={mobile} username={username} />
110+
<SketchList
111+
key={username}
112+
mobile={mobile}
113+
username={username}
114+
t={t}
115+
/>
111116
);
112117
}
113118
};

0 commit comments

Comments
 (0)