mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-09-10 19:54:57 +02:00
16 lines
360 B
JavaScript
16 lines
360 B
JavaScript
import React from 'react';
|
|
|
|
export default function Loading(props) {
|
|
if (props.isLoading) {
|
|
if (props.timedOut) {
|
|
return <div>Loader timed out!</div>;
|
|
} else if (props.pastDelay) {
|
|
return <div>Loading...</div>;
|
|
}
|
|
return null;
|
|
} else if (props.error) {
|
|
return <div>Error! Component failed to load</div>;
|
|
}
|
|
return null;
|
|
}
|