feat: use dialog instead of page

This commit is contained in:
email
2022-03-20 23:53:50 +08:00
parent 2b5ee78397
commit da1ccabd1e
15 changed files with 190 additions and 260 deletions

View File

@ -67,14 +67,11 @@ const ShortcutContainer: React.FC<ShortcutContainerProps> = (props: ShortcutCont
const { shortcut, isActive } = props;
const [showConfirmDeleteBtn, toggleConfirmDeleteBtn] = useToggle(false);
console.log(props);
const handleShortcutClick = () => {
console.log("here");
if (isActive) {
locationService.setMemoShortcut("");
} else {
if (!["/", "/trash"].includes(locationService.getState().pathname)) {
if (!["/"].includes(locationService.getState().pathname)) {
locationService.setPathname("/");
}
locationService.setMemoShortcut(shortcut.id);