import { FC } from "react"; import { TFunction } from "i18next"; import { withTranslation, WithTranslation } from "react-i18next"; import Box from "../Styled/Box"; import { TextSpan } from "../Styled/Text"; import AnimatedSpinnerIcon from "../Styled/AnimatedSpinnerIcon"; interface PropsType extends WithTranslation { message?: string; boxProps?: any; textProps?: any; hideMessage?: boolean; t: TFunction; [spread: string]: any; } const Loader: FC = (props: PropsType) => { const { message, t, boxProps, textProps, hideMessage, ...rest }: PropsType = props; return ( {!hideMessage && (message || t(($) => $.loader.loadingMessage))} ); }; export default withTranslation()(Loader);