feat: layout style(1)

This commit is contained in:
email
2022-03-20 20:02:48 +08:00
parent 8ad98291eb
commit 2b5ee78397
34 changed files with 70 additions and 194 deletions

View File

@ -67,11 +67,14 @@ const ShortcutContainer: React.FC<ShortcutContainerProps> = (props: ShortcutCont
const { shortcut, isActive } = props;
const [showConfirmDeleteBtn, toggleConfirmDeleteBtn] = useToggle(false);
const handleQueryClick = () => {
console.log(props);
const handleShortcutClick = () => {
console.log("here");
if (isActive) {
locationService.setMemoShortcut("");
} else {
if (!["/", "/recycle"].includes(locationService.getState().pathname)) {
if (!["/", "/trash"].includes(locationService.getState().pathname)) {
locationService.setPathname("/");
}
locationService.setMemoShortcut(shortcut.id);
@ -125,7 +128,7 @@ const ShortcutContainer: React.FC<ShortcutContainerProps> = (props: ShortcutCont
return (
<>
<div className={`shortcut-container ${isActive ? "active" : ""}`} onClick={handleQueryClick}>
<div className={`shortcut-container ${isActive ? "active" : ""}`} onClick={handleShortcutClick}>
<div className="shortcut-text-container">
<span className="icon-text">#</span>
<span className="shortcut-text">{shortcut.title}</span>