cleanup debug

This commit is contained in:
lingdocs 2021-09-18 00:56:50 -04:00
parent 9c2c547c13
commit 3d27a52944
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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" }}>