import { FC } from "react"; import { withTranslation, WithTranslation, TFunction } 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);