fix(tui): route shell termination by location
This commit is contained in:
parent
59790380de
commit
fd4497e6b9
2 changed files with 9 additions and 10 deletions
|
|
@ -831,15 +831,6 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({
|
|||
shell: Object.fromEntries(mutable(result.data).map((info) => [info.id, info])),
|
||||
})
|
||||
},
|
||||
async remove(id: string) {
|
||||
await sdk.api.shell.remove({ id })
|
||||
setStore(
|
||||
"location",
|
||||
produce((draft) => {
|
||||
for (const data of Object.values(draft)) delete data.shell?.[id]
|
||||
}),
|
||||
)
|
||||
},
|
||||
},
|
||||
location: {
|
||||
default() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue