18 lines
339 B
TypeScript
18 lines
339 B
TypeScript
import React from "react";
|
|
import LoadingPanel from "./LoadingPanel";
|
|
|
|
interface Loading2Props {
|
|
loaded: boolean;
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
const Loading: React.FC<Loading2Props> = ({ loaded, children }) => {
|
|
if (!loaded) {
|
|
return <LoadingPanel />;
|
|
}
|
|
|
|
return <>{children}</>;
|
|
};
|
|
|
|
export default Loading;
|