diff --git a/src/components/splash-screen/WithSplashScreen.tsx b/src/components/splash-screen/WithSplashScreen.tsx
new file mode 100644
index 0000000..67e4229
--- /dev/null
+++ b/src/components/splash-screen/WithSplashScreen.tsx
@@ -0,0 +1,40 @@
+import React, { Component } from 'react';
+import Launch from '../layout/Launch';
+
+const WithSplashScreen = (
+ WrappedComponent: React.ComponentType
+ ) => {
+ return class extends Component
{
+ constructor(props: Readonly
) {
+ super(props);
+ this.state = {
+ loading: true,
+ };
+ }
+
+ componentDidMount() {
+ try {
+ setTimeout(() => {
+ this.setState({
+ loading: false,
+ });
+ }, 4000)
+ } catch (err) {
+ console.log(err);
+ this.setState({
+ loading: false,
+ });
+ }
+ }
+
+ render() {
+ // while checking user session, show "loading" message
+ if (this.state.loading) return ;
+
+ // otherwise, show the desired route
+ return ;
+ }
+ };
+}
+
+export default WithSplashScreen;
diff --git a/src/db/characters.json b/src/db/characters.json
index b9f0ec6..7b6b028 100644
--- a/src/db/characters.json
+++ b/src/db/characters.json
@@ -4,6 +4,6 @@
{ "id": 2, "createdAt": "16 Mar, 2019", "name": "Phil Rigor", "age": 32, "occupation": "Singer", "role": "Major" },
{ "id": 3, "createdAt": "16 Mar, 2019", "name": "Ellen Mitchell", "age": 27, "occupation": "Journalist", "role": "Minor" },
{ "id": 4, "createdAt": "16 Mar, 2019", "name": "Paula Cloud", "age": 58, "occupation": "Driver", "role": "Master" },
- { "id": 5, "createdAt": "16 Mar, 2019", "name": "Edgard Lazd", "age": 21, "occupation": "Solder", "role": "Major" }
+ { "id": 5, "createdAt": "16 Mar, 2019", "name": "Edgard Lazd", "age": 21, "occupation": "Soldier", "role": "Major" }
]
}
\ No newline at end of file
diff --git a/src/translations/en.json b/src/translations/en.json
index c666c34..993ecb0 100644
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -17,5 +17,18 @@
"signinwithgoogle": "Sign In with Google",
"signinanon": "Sign In Anonymously"
}
+ },
+ "characters": {
+ "title": "Recent characters",
+ "tablehead": {
+ "date": "Date",
+ "name": "Name",
+ "age": "Age",
+ "occupation": "Occupation",
+ "role": "Role"
+ },
+ "button": {
+ "seemore": "See more characters"
+ }
}
}
\ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
index 8df4250..416195a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1941,6 +1941,17 @@
dependencies:
"@babel/runtime" "^7.4.4"
+"@material-ui/lab@^4.0.0-alpha.56":
+ version "4.0.0-alpha.56"
+ resolved "https://registry.yarnpkg.com/@material-ui/lab/-/lab-4.0.0-alpha.56.tgz#ff63080949b55b40625e056bbda05e130d216d34"
+ integrity sha512-xPlkK+z/6y/24ka4gVJgwPfoCF4RCh8dXb1BNE7MtF9bXEBLN/lBxNTK8VAa0qm3V2oinA6xtUIdcRh0aeRtVw==
+ dependencies:
+ "@babel/runtime" "^7.4.4"
+ "@material-ui/utils" "^4.10.2"
+ clsx "^1.0.4"
+ prop-types "^15.7.2"
+ react-is "^16.8.0"
+
"@material-ui/styles@^4.10.0":
version "4.10.0"
resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.10.0.tgz#2406dc23aa358217aa8cc772e6237bd7f0544071"