-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from gmickel:improve-loading-screen
feat: Update Quiz component to use lazy loading and add LoadingScreen component
- Loading branch information
Showing
4 changed files
with
45 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import { Loader2 } from 'lucide-react'; | ||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; | ||
import { Progress } from '@/components/ui/progress'; | ||
import { config } from '@/config'; | ||
|
||
interface LoadingScreenProps { | ||
message: string; | ||
} | ||
|
||
const LoadingScreen: React.FC<LoadingScreenProps> = ({ message }) => { | ||
return ( | ||
<div className="flex items-center justify-center min-h-screen bg-gray-100"> | ||
<Card className="w-full max-w-md"> | ||
<CardHeader> | ||
<CardTitle className="text-2xl font-bold text-center">{config.title}</CardTitle> | ||
</CardHeader> | ||
<CardContent> | ||
<div className="flex flex-col items-center space-y-4"> | ||
<Loader2 className="h-8 w-8 animate-spin text-primary" /> | ||
<p className="text-center text-muted-foreground">{message}</p> | ||
<Progress value={66} className="w-full" /> | ||
</div> | ||
</CardContent> | ||
</Card> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LoadingScreen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters