mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
24 lines
509 B
TypeScript
24 lines
509 B
TypeScript
import React from "react";
|
|
|
|
import { LoadingMessage } from "./LoadingMessage";
|
|
import { setLanguageFirstTime } from "../i18n";
|
|
|
|
export class InitializeApp extends React.Component<
|
|
any,
|
|
{ isLoading: boolean }
|
|
> {
|
|
public state: { isLoading: boolean } = {
|
|
isLoading: true,
|
|
};
|
|
|
|
async componentDidMount() {
|
|
await setLanguageFirstTime();
|
|
this.setState({
|
|
isLoading: false,
|
|
});
|
|
}
|
|
|
|
public render() {
|
|
return this.state.isLoading ? <LoadingMessage /> : this.props.children;
|
|
}
|
|
}
|