mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 01:53:33 -06:00
* Feature: Encapsulated dynamic imports with error boundary and suspense * Refactor: Changes after PR review * Align PageLoader and LoadingPlaceholder * Updated loading failed UI abit * Change Failed to Unable
18 lines
379 B
TypeScript
18 lines
379 B
TypeScript
import React, { FC } from 'react';
|
|
import { LoadingPlaceholder } from '@grafana/ui';
|
|
|
|
interface Props {
|
|
pageName?: string;
|
|
}
|
|
|
|
const PageLoader: FC<Props> = ({ pageName = '' }) => {
|
|
const loadingText = `Loading ${pageName}...`;
|
|
return (
|
|
<div className="page-loader-wrapper">
|
|
<LoadingPlaceholder text={loadingText} />
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default PageLoader;
|