mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 09:06:19 +08:00
fix:delete workspace will jump to 404
This commit is contained in:
@@ -132,7 +132,6 @@ export const WorkspaceModal = ({ open, onClose }: WorkspaceModalProps) => {
|
||||
onClose={async wait => {
|
||||
if (!wait) {
|
||||
await logout();
|
||||
router.push(`/workspace`);
|
||||
}
|
||||
setLogoutOpen(false);
|
||||
}}
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
import { useState } from 'react';
|
||||
import { ModalCloseButton } from '@/ui/modal';
|
||||
import { Button } from '@/ui/button';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
import { WorkspaceUnit } from '@affine/datacenter';
|
||||
import { Trans, useTranslation } from '@affine/i18n';
|
||||
@@ -30,7 +29,6 @@ export const WorkspaceDelete = ({
|
||||
}: WorkspaceDeleteProps) => {
|
||||
const [deleteStr, setDeleteStr] = useState<string>('');
|
||||
const { t } = useTranslation();
|
||||
const router = useRouter();
|
||||
const { deleteWorkSpace } = useWorkspaceHelper();
|
||||
const handlerInputChange = (workspaceName: string) => {
|
||||
setDeleteStr(workspaceName);
|
||||
@@ -39,7 +37,6 @@ export const WorkspaceDelete = ({
|
||||
const handleDelete = async () => {
|
||||
await deleteWorkSpace();
|
||||
onClose();
|
||||
router.push(`/workspace`);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user