mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-17 20:55:28 +00:00
chore: add loading spin
This commit is contained in:
parent
156218b40f
commit
dfc797fe58
@ -20,7 +20,6 @@ const Home: React.FC = () => {
|
||||
return (
|
||||
<div className="w-full h-full flex flex-col justify-start items-start">
|
||||
<Header />
|
||||
{loadingState.isLoading ? null : (
|
||||
<div className="mx-auto max-w-4xl w-full px-3 py-6 flex flex-col justify-start items-start">
|
||||
<div className="mb-4 w-full flex flex-row justify-between items-center">
|
||||
<span className="font-mono text-gray-400">Workspace List</span>
|
||||
@ -31,10 +30,16 @@ const Home: React.FC = () => {
|
||||
<Icon.Plus className="w-5 h-auto mr-1" /> Create Workspace
|
||||
</div>
|
||||
</div>
|
||||
<WorkspaceListView workspaceList={workspaceList} />
|
||||
{loadingState.isLoading ? (
|
||||
<div className="py-4 w-full flex flex-row justify-center items-center">
|
||||
<Icon.Loader className="mr-2 w-5 h-auto animate-spin" />
|
||||
loading
|
||||
</div>
|
||||
) : (
|
||||
<WorkspaceListView workspaceList={workspaceList} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -46,7 +46,6 @@ const WorkspaceDetail: React.FC = () => {
|
||||
return (
|
||||
<div className="w-full h-full flex flex-col justify-start items-start">
|
||||
<Header />
|
||||
{loadingState.isLoading ? null : (
|
||||
<div className="mx-auto max-w-4xl w-full px-3 py-6 flex flex-col justify-start items-start">
|
||||
<div className="w-full flex flex-row justify-start items-center mb-4">
|
||||
<span className="font-mono text-gray-600 cursor-pointer hover:underline" onClick={() => handleBackToHome()}>
|
||||
@ -64,10 +63,16 @@ const WorkspaceDetail: React.FC = () => {
|
||||
<Icon.Plus className="w-5 h-auto mr-1" /> Create Shortcut
|
||||
</div>
|
||||
</div>
|
||||
<ShortcutListView workspaceId={state.workspace.id} shortcutList={shortcutList} />
|
||||
{loadingState.isLoading ? (
|
||||
<div className="py-4 w-full flex flex-row justify-center items-center">
|
||||
<Icon.Loader className="mr-2 w-5 h-auto animate-spin" />
|
||||
loading
|
||||
</div>
|
||||
) : (
|
||||
<ShortcutListView workspaceId={state.workspace.id} shortcutList={shortcutList} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user