save last build dir

This commit is contained in:
codetypes committed 2025-03-20 08:15:34 +08:00
1 parent 9af6aef614
commit 3a2f09541c
4 files changed
+29 -22

No files matched your search

+1 -3
View File
@@ -58,9 +58,7 @@ export const Menu: FC<LayoutProps> = () => {
);
const enabled = !!workspace.workdir;
const homedir = app.getPath("home");
const settings = {
recent: useSetting((state) => state.recent),
};
const { settings } = useSetting(useShallow((state) => ({ settings: state.data })));
const menuTemplate: MenuItemConstructorOptions[] = useMemo(() => {
const recentWorkspaces: MenuItemConstructorOptions[] = settings.recent.map((path, i) => ({
+1 -1
View File
@@ -39,7 +39,7 @@ export const Workspace: FC = () => {
find: state.find,
}))
);
const settings = useSetting(useShallow((state) => ({ recent: state.recent })));
const { settings } = useSetting(useShallow((state) => ({ settings: state.data })));
const [isShowingAlert, setShowingAlert] = useState(false);
const { t } = useTranslation();
const forceUpdate = useForceUpdate();