Skip to content

Commit

Permalink
changing the loading text
Browse files Browse the repository at this point in the history
  • Loading branch information
mirrormystic committed Oct 14, 2024
1 parent 7c17e2a commit 4e08816
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion keep-ui/app/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import Image from "next/image";
export default function Loading({
includeMinHeight = true,
slowLoading = false,
loadingText = "Just a second, getting your data 🚨"
loadingText = "Just a second, getting your data 🚨",
extraLoadingText = ""
}: {
includeMinHeight?: boolean;
slowLoading?: boolean;
loadingText?: string;
extraLoadingText?: string;
}) {
return (
<main
Expand All @@ -24,6 +26,11 @@ export default function Loading({
height={200}
/>
<Title>{loadingText}</Title>

{extraLoadingText && (
<Subtitle>{extraLoadingText}</Subtitle>
)}

{slowLoading && (
<Subtitle>
This is taking a bit longer then usual, please wait...
Expand Down
2 changes: 1 addition & 1 deletion keep-ui/app/rules/AIGenRules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export const AIGenRules: React.FC = () => {
});

if (isLoadingRules) {
return <Loading loadingText="Generating AI recommendations..." />;
return <Loading loadingText="Generating AI recommendations..." extraLoadingText="This might take a handfull of minutes" />;
}

if (generatedRules.error) {
Expand Down

0 comments on commit 4e08816

Please sign in to comment.