diff --git a/src/views/SaveSelector.tsx b/src/views/SaveSelector.tsx index 574a423..f3d871e 100644 --- a/src/views/SaveSelector.tsx +++ b/src/views/SaveSelector.tsx @@ -2,6 +2,7 @@ import { invoke } from "@tauri-apps/api/core"; import DragAndDrop from "../components/DragAndDrop"; import { useEffect, useState } from "preact/hooks"; import { FolderIcon } from "@heroicons/react/20/solid"; +import { cn } from "../utils"; type SaveFile = { name: string; @@ -48,21 +49,32 @@ export default function SaveSelector({ onFile }: SaveSelectorProps) { return ( <> -
- Or, select a save file from below -
-
- {saveFiles.map((file) => { - return ( - { - onFile?.(file.path); - }} - file={file} - /> - ); - })} +
+ {saveFiles.length > 0 + ? "Or, select a save file from below" + : "No save files found..."}
+ {saveFiles.length > 0 ? ( + <> +
+ {saveFiles.map((file) => { + return ( + { + onFile?.(file.path); + }} + file={file} + /> + ); + })} +
+ + ) : null} ); }