mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
Tabs Improvements: - refactor tabs so no more race condition revolving unneccessary signals - clean up signals - refactor upload modal movement to be non-signaled and generalized for more files types - better naming for files and components, better error handling, eslint type any fix - upload file screen can use less state rerenders and better error messages Object Uploader - adapt the old object upload modal with 3d object preview into the updated best version of upload modal - preview loader code improvements, better flow and organization Sets Tab: - create a set tab, it currently show objects - hide it behind a FeatureFlag --------- Co-authored-by: wil <wil@storyteller.ai>
32 lines
697 B
TypeScript
32 lines
697 B
TypeScript
import { Button, P, H3 } from "~/components";
|
|
import { FilterEngineCategories } from "~/enums";
|
|
|
|
interface Props {
|
|
onCancel: () => void;
|
|
onRetry: () => void;
|
|
type: FilterEngineCategories | string;
|
|
errorMessage?: string;
|
|
}
|
|
|
|
export const UploadAssetError = ({
|
|
onCancel,
|
|
onRetry,
|
|
type,
|
|
errorMessage,
|
|
}: Props) => {
|
|
return (
|
|
<>
|
|
<H3>Error in Uploading {type}</H3>
|
|
<P>{errorMessage ?? "Unknown Error"}</P>
|
|
<div className="mt-6 flex justify-end gap-2">
|
|
<Button onClick={onCancel} variant="secondary">
|
|
Cancel
|
|
</Button>
|
|
<Button onClick={onRetry} variant="primary">
|
|
Try again
|
|
</Button>
|
|
</div>
|
|
</>
|
|
);
|
|
};
|