cleanup debug
This commit is contained in:
parent
9c2c547c13
commit
3d27a52944
|
@ -35,13 +35,14 @@ if (prod) {
|
||||||
|
|
||||||
function App(props: RouteComponentProps) {
|
function App(props: RouteComponentProps) {
|
||||||
const [navOpen, setNavOpen] = useState(false);
|
const [navOpen, setNavOpen] = useState(false);
|
||||||
|
// TODO: seperate function for getUserInfo with useUser and fetch
|
||||||
|
// then set cronjob to call that - also do signin flox
|
||||||
const { setUser } = useUser();
|
const { setUser } = useUser();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
ReactGA.pageview(window.location.pathname);
|
ReactGA.pageview(window.location.pathname);
|
||||||
fetch("https://account.lingdocs.com/api/user", { credentials: "include" })
|
fetch("https://account.lingdocs.com/api/user", { credentials: "include" })
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("fetched user info");
|
|
||||||
if (res.user) {
|
if (res.user) {
|
||||||
const user = res.user as AT.LingdocsUser
|
const user = res.user as AT.LingdocsUser
|
||||||
setUser(user);
|
setUser(user);
|
||||||
|
|
|
@ -86,7 +86,6 @@ function GameCore<T>({ questions, Display, timeLimit, Instructions, studyLink, i
|
||||||
: finish === "fail"
|
: finish === "fail"
|
||||||
? "danger"
|
? "danger"
|
||||||
: "primary";
|
: "primary";
|
||||||
console.log("user is", user)
|
|
||||||
return <div>
|
return <div>
|
||||||
<div className="text-center" style={{ minHeight: "200px" }}>
|
<div className="text-center" style={{ minHeight: "200px" }}>
|
||||||
<div className="progress" style={{ height: "5px" }}>
|
<div className="progress" style={{ height: "5px" }}>
|
||||||
|
|
Loading…
Reference in New Issue