aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/views/common/LoadFailReload.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-14 17:29:11 +0800
committercrupest <crupest@outlook.com>2021-02-14 17:29:11 +0800
commitfe7587f44296b88c08927d2eae8fda3f375eaa8c (patch)
tree4b073fb0fe0c56de989b6d21de34311d76672c59 /FrontEnd/src/app/views/common/LoadFailReload.tsx
parent6791c26e28b5113796fdf34e29f7affe12ee556e (diff)
downloadtimeline-fe7587f44296b88c08927d2eae8fda3f375eaa8c.tar.gz
timeline-fe7587f44296b88c08927d2eae8fda3f375eaa8c.tar.bz2
timeline-fe7587f44296b88c08927d2eae8fda3f375eaa8c.zip
...
Diffstat (limited to 'FrontEnd/src/app/views/common/LoadFailReload.tsx')
-rw-r--r--FrontEnd/src/app/views/common/LoadFailReload.tsx37
1 files changed, 37 insertions, 0 deletions
diff --git a/FrontEnd/src/app/views/common/LoadFailReload.tsx b/FrontEnd/src/app/views/common/LoadFailReload.tsx
new file mode 100644
index 00000000..a80e7b76
--- /dev/null
+++ b/FrontEnd/src/app/views/common/LoadFailReload.tsx
@@ -0,0 +1,37 @@
+import React from "react";
+import { Trans } from "react-i18next";
+
+export interface LoadFailReloadProps {
+ className?: string;
+ style?: React.CSSProperties;
+ onReload: () => void;
+}
+
+const LoadFailReload: React.FC<LoadFailReloadProps> = ({
+ onReload,
+ className,
+ style,
+}) => {
+ return (
+ <Trans
+ i18nKey="loadFailReload"
+ parent="div"
+ className={className}
+ style={style}
+ >
+ 0
+ <a
+ href="#"
+ onClick={(e) => {
+ onReload();
+ e.preventDefault();
+ }}
+ >
+ 1
+ </a>
+ 2
+ </Trans>
+ );
+};
+
+export default LoadFailReload;