diff --git a/public/loader.svg b/public/loader.svg
new file mode 100644
index 0000000..8e345cc
--- /dev/null
+++ b/public/loader.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/mainapp.js b/src/components/mainapp.js
index d415e0b..70eebfa 100644
--- a/src/components/mainapp.js
+++ b/src/components/mainapp.js
@@ -1,6 +1,7 @@
import React from "react";
import { useState } from "react";
import PropTypes from "prop-types";
+import Stats from "./stats";
export default (player) => {
function MainApp(props) {
@@ -19,15 +20,7 @@ export default (player) => {
}}>Logout
-
- { playerStats === null ? "Loading" :
-
- - XP: {playerStats.xp}
- - Quests: {playerStats.quests_completed}/{playerStats.total_quests}
- - Side Quests: {playerStats.side_quests_completed}/{playerStats.total_side_quests}
-
- }
-
+
);
diff --git a/src/components/stats.js b/src/components/stats.js
new file mode 100644
index 0000000..95e4f84
--- /dev/null
+++ b/src/components/stats.js
@@ -0,0 +1,18 @@
+import React from "react";
+
+export default function Stats(props) {
+ if (props.playerStats === null) {
+ return ;
+ } else {
+ const { xp, quests_completed, total_quests, side_quests_completed, total_side_quests } = props.playerStats;
+ return (
+
+
+ - XP: {xp}
+ - Quests: {quests_completed}/{total_quests}
+ - Side Quests: {side_quests_completed}/{total_side_quests}
+
+
+ );
+ }
+}