fix: redirect permission issue after change handle (#507)
This commit is contained in:
parent
a9d3404642
commit
75a7f12803
|
|
@ -68,11 +68,16 @@ export default function SettingsDomainsPage() {
|
|||
if (updateSite.isSuccess) {
|
||||
if (updateSite.data?.code === 0) {
|
||||
toast.success("Saved!")
|
||||
router.replace(
|
||||
`/dashboard/${
|
||||
updateSite.variables?.subdomain || updateSite.variables?.site
|
||||
}/settings/domains`,
|
||||
)
|
||||
useAccountState
|
||||
.getState()
|
||||
.refresh()
|
||||
.then(() => {
|
||||
router.replace(
|
||||
`/dashboard/${
|
||||
updateSite.variables?.subdomain || updateSite.variables?.site
|
||||
}/settings/domains`,
|
||||
)
|
||||
})
|
||||
} else {
|
||||
toast.error("Failed to update site" + ": " + updateSite.data.message)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue