grafana/public/app/core/navigation/GrafanaRouteLoading.tsx
Torkel Ödegaard 96dfc4bac5
GrafanaRoute: Use React.Lazy instead of react-loadable and improve error handling (#55339)
* Things are working

* Add new GrafanaRoute tests

* removed old file

* Remove from package.json
2022-09-21 05:41:05 +02:00

25 lines
511 B
TypeScript

import { css } from '@emotion/css';
import React from 'react';
import { LoadingPlaceholder, useStyles2 } from '@grafana/ui';
export function GrafanaRouteLoading() {
const styles = useStyles2(getStyles);
return (
<div className={styles.loadingPage}>
<LoadingPlaceholder text={'Loading...'} />
</div>
);
}
const getStyles = () => ({
loadingPage: css({
height: '100%',
flexDrection: 'column',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}),
});