add learneth build-in repos to selections

pull/5237/head
drafish 2 months ago committed by yann300
parent 5aab313abd
commit 023fd1f5a6
  1. 6
      apps/learneth/src/redux/models/workshop.ts

@ -22,7 +22,7 @@ export const repoMap = {
const Model: ModelType = {
namespace: 'workshop',
state: {
list: [],
list: Object.keys(repoMap).map(item => repoMap[item]),
detail: {},
selectedId: '',
},
@ -104,7 +104,7 @@ const Model: ModelType = {
...payload,
},
},
list: detail[repoId] ? list : [...list, payload],
list: list.map(item => `${item.name}/${item.branch}`).includes(`${payload.name}/${payload.branch}`) ? list : [...list, payload],
selectedId: repoId,
}
yield put({
@ -137,7 +137,7 @@ const Model: ModelType = {
yield put({
type: 'workshop/save',
payload: {
list: [],
list: Object.keys(repoMap).map(item => repoMap[item]),
detail: {},
selectedId: '',
},

Loading…
Cancel
Save