/
dedaMazai
/
reactGoodPattern
Обзор
Документация
Войти
/
dedaMazai
/
reactGoodPattern
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
moduleFederation/container/src/widgets/PageError/ui/PageError.tsx
26 строк
699 B
Andrey Chipizubov
add microFronts
25 май 2023, 01:05
25 май 2023, 01:05
ec973d2
Код
Авторство
О чём код?
import { useTranslation } from "react-i18next"; import { classNames } from "@/shared/lib/classNames/classNames"; import cls from "./PageError.module.scss"; interface PageErrorProps { className?: string } export const PageError = ({ className }: PageErrorProps) => { const { t } = useTranslation(); const reloadPage = () => { // eslint-disable-next-line no-restricted-globals location.reload(); }; return ( <div className={classNames(cls.PageError, {}, [className])}> <p>{t("The unknown problem")}</p> <button onClick={reloadPage} type="button"> {t("Refresh site")} </button> </div> ); };