mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-27 16:10:30 +08:00
Ran prettier and fixed permanent loadingScreen in assistant_reply
This commit is contained in:
@@ -40,14 +40,14 @@ const AssistantReply = () => {
|
||||
});
|
||||
};
|
||||
|
||||
if (true) {
|
||||
return (<LoadingScreen text="Loading..."/>);
|
||||
if (isLoading) {
|
||||
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 (
|
||||
<div className="p-6 bg-slate-100 text-gray-800">
|
||||
|
||||
@@ -51,8 +51,9 @@ const SummarizeStory = () => {
|
||||
};
|
||||
|
||||
if (isLoading) {
|
||||
return (<LoadingScreen text="Loading..."/>);
|
||||
return <LoadingScreen text="Loading..." />;
|
||||
}
|
||||
|
||||
if (tasks.length == 0) {
|
||||
return <div className="p-6 bg-slate-100 text-gray-800">No tasks found...</div>;
|
||||
}
|
||||
|
||||
@@ -40,14 +40,10 @@ const UserReply = () => {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
if (isLoading) {
|
||||
return (<LoadingScreen text="Loading..."/>);
|
||||
return <LoadingScreen text="Loading..." />;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: Make this a nicer loading screen.
|
||||
*/
|
||||
if (tasks.length == 0) {
|
||||
return <div className="p-6 bg-slate-100 text-gray-800">No tasks found...</div>;
|
||||
}
|
||||
|
||||
@@ -46,11 +46,13 @@ const RankInitialPrompts = () => {
|
||||
};
|
||||
|
||||
if (isLoading) {
|
||||
return (<LoadingScreen text="Loading..."/>);
|
||||
return <LoadingScreen text="Loading..." />;
|
||||
}
|
||||
|
||||
if (tasks.length == 0) {
|
||||
return <div className="p-6 bg-slate-100 text-gray-800">No tasks found...</div>;
|
||||
}
|
||||
|
||||
const prompts = tasks[0].task.prompts as string[];
|
||||
const items = ranking.map((i) => ({
|
||||
text: prompts[i],
|
||||
|
||||
@@ -51,8 +51,9 @@ const RateSummary = () => {
|
||||
};
|
||||
|
||||
if (isLoading) {
|
||||
return (<LoadingScreen text="Loading..."/>);
|
||||
return <LoadingScreen text="Loading..." />;
|
||||
}
|
||||
|
||||
if (tasks.length == 0) {
|
||||
return <div className="p-6 bg-slate-100 text-gray-800">No tasks found...</div>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user