save last build dir
This commit is contained in:
1 parent
9af6aef614
commit
3a2f09541c
4 files changed
+29
-22
No files matched your search
@@ -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) => ({
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user