Files
lanspread/crates/lanspread-tauri-deno-ts/src/components/empty/NoDirectoryState.tsx
T
ddidderr e688fd3016 fix(ui): treat missing game folders as unset
Validate the persisted game directory before sending it to the backend or
showing library content for it. When the saved path no longer exists, the
launcher keeps the top bar visible but shows the folder picker empty state
and labels the Game Folder button as an unset folder.

This keeps stale local data from being presented as the active library when
an old path is deleted or disconnected.

Test Plan:
- git diff --check
- just frontend-test
- just build
2026-05-21 19:17:51 +02:00

17 lines
510 B
TypeScript

import { Icon } from '../Icon';
interface Props {
onChooseDirectory: () => void;
}
export const NoDirectoryState = ({ onChooseDirectory }: Props) => (
<div className="empty-state">
<div className="empty-state-icon"><Icon.folder /></div>
<h2 className="empty-state-title">Please select a game folder</h2>
<button type="button" className="ghost-btn" onClick={onChooseDirectory}>
<Icon.folder />
<span>Choose folder</span>
</button>
</div>
);