mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
Extract loading screen compontent #69
This commit is contained in:
parent
f185c76c6e
commit
23cfcacd09
2 changed files with 28 additions and 16 deletions
21
src/components/application-loader/loading-screen.tsx
Normal file
21
src/components/application-loader/loading-screen.tsx
Normal file
|
@ -0,0 +1,21 @@
|
|||
import React from "react";
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {Alert} from "react-bootstrap";
|
||||
|
||||
export interface LoadingScreenProps {
|
||||
failed: boolean
|
||||
}
|
||||
|
||||
export const LoadingScreen: React.FC<LoadingScreenProps> = ({failed}) => {
|
||||
return (
|
||||
<div className="loader middle">
|
||||
<div className="icon">
|
||||
<FontAwesomeIcon icon="file-alt" size="6x"
|
||||
className={failed ? "animation-shake" : "animation-pulse"}/>
|
||||
</div>
|
||||
{
|
||||
failed ? <Alert variant={"danger"}>An error occured while loading the application!</Alert> : null
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue