mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
routes: refreshing map list on save
This commit is contained in:
parent
b28803aff3
commit
e4894c7767
2 changed files with 20 additions and 17 deletions
|
@ -292,22 +292,6 @@ function* refreshUserData() {
|
|||
return yield put(setUser(data));
|
||||
}
|
||||
|
||||
function* setSaveSuccessSaga({ address, title }) {
|
||||
const { id } = yield select(getUser);
|
||||
|
||||
replacePath(`/${address}/edit`);
|
||||
|
||||
yield put(setTitle(title));
|
||||
yield put(setAddress(address));
|
||||
yield put(setChanged(false));
|
||||
|
||||
yield editor.owner = { id };
|
||||
|
||||
yield call(refreshUserData);
|
||||
|
||||
return yield editor.setInitialData();
|
||||
}
|
||||
|
||||
function* getRenderData() {
|
||||
yield put(setRenderer({ info: 'Загрузка тайлов', progress: 0.1 }));
|
||||
|
||||
|
@ -496,6 +480,25 @@ function* searchSetTabSaga() {
|
|||
yield call(searchSetSaga);
|
||||
}
|
||||
|
||||
function* setSaveSuccessSaga({ address, title }) {
|
||||
const { id } = yield select(getUser);
|
||||
const { dialog_active } = yield select(getState);
|
||||
|
||||
replacePath(`/${address}/edit`);
|
||||
|
||||
yield put(setTitle(title));
|
||||
yield put(setAddress(address));
|
||||
yield put(setChanged(false));
|
||||
|
||||
yield editor.owner = { id };
|
||||
|
||||
if (dialog_active) {
|
||||
yield call(searchSetSagaWorker);
|
||||
}
|
||||
|
||||
return yield editor.setInitialData();
|
||||
}
|
||||
|
||||
export function* userSaga() {
|
||||
yield takeLatest(REHYDRATE, authCheckSaga);
|
||||
yield takeEvery(ACTIONS.SET_MODE, setModeSaga);
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
opacity: 0.3;
|
||||
margin-bottom: 5px;
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr 1fr;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
|
||||
svg {
|
||||
width: 20px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue