Skip to content

Commit 0322834

Browse files
committed
Remove unused project loading code
I think this moved to the standalone project
1 parent 91091f1 commit 0322834

3 files changed

Lines changed: 0 additions & 36 deletions

File tree

src/redux/EditorSlice.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,6 @@ export const syncProject = (actionName) =>
7878
},
7979
);
8080

81-
export const loadProjectList = createAsyncThunk(
82-
`editor/loadProjectList`,
83-
async ({ reactAppApiEndpoint, page, accessToken }) => {
84-
const { readProjectList } = ApiCallHandler({
85-
reactAppApiEndpoint,
86-
});
87-
const response = await readProjectList(page, accessToken);
88-
return {
89-
projects: response.data,
90-
page,
91-
links: parseLinkHeader(response.headers.link),
92-
};
93-
},
94-
);
95-
9681
export const editorInitialState = {
9782
project: {},
9883
cascadeUpdate: false,

src/utils/apiCallHandler.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,6 @@ const ApiCallHandler = ({ reactAppApiEndpoint }) => {
8181
);
8282
};
8383

84-
const readProjectList = async (page, accessToken) => {
85-
return await get(`${host}/api/projects`, {
86-
params: { page },
87-
...headers(accessToken),
88-
});
89-
};
90-
9184
const createError = async (
9285
projectIdentifier,
9386
userId,
@@ -116,7 +109,6 @@ const ApiCallHandler = ({ reactAppApiEndpoint }) => {
116109
createRemix,
117110
readProject,
118111
loadAssets,
119-
readProjectList,
120112
createError,
121113
};
122114
};

src/utils/apiCallHandler.test.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const {
1515
readProject,
1616
loadAssets,
1717
createRemix,
18-
readProjectList,
1918
createError,
2019
} = ApiCallHandler({ reactAppApiEndpoint: host });
2120

@@ -168,18 +167,6 @@ describe("Testing project API calls", () => {
168167
});
169168
});
170169

171-
describe("Index page API calls", () => {
172-
test("Loading project list", async () => {
173-
axios.get.mockImplementationOnce(() => Promise.resolve(200));
174-
const page = 3;
175-
await readProjectList(page, accessToken);
176-
expect(axios.get).toHaveBeenCalledWith(`${host}/api/projects`, {
177-
...authHeaders,
178-
params: { page },
179-
});
180-
});
181-
});
182-
183170
describe("Testing project errors API calls", () => {
184171
let projectIdentifier = "original-hello-project";
185172
let userId = "b48e70e2-d9ed-4a59-aee5-fc7cf09dbfaf";

0 commit comments

Comments
 (0)