mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-19 11:50:35 +08:00
new LoadingScreen to replace old loading divs
This commit is contained in:
@@ -8,6 +8,7 @@ import poster from "src/lib/poster";
|
||||
import { Messages } from "src/components/Messages";
|
||||
import { TwoColumns } from "src/components/TwoColumns";
|
||||
import { Button } from "src/components/Button";
|
||||
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
|
||||
|
||||
const AssistantReply = () => {
|
||||
const [tasks, setTasks] = useState([]);
|
||||
@@ -39,12 +40,13 @@ const AssistantReply = () => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* TODO: Make this a nicer loading screen.
|
||||
*/
|
||||
if (tasks.length == 0) {
|
||||
return <div className="p-6 bg-slate-100 text-gray-800">Loading...</div>;
|
||||
if (true) {
|
||||
return (<LoadingScreen text="Loading..."/>);
|
||||
}
|
||||
if (tasks.length == 0) {
|
||||
return <div className="p-6 bg-slate-100 text-gray-800">No tasks found...</div>;
|
||||
}
|
||||
|
||||
|
||||
const task = tasks[0].task;
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user