This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <exception> | |
#include <coroutine> | |
#include <atomic> | |
#include <functional> | |
#include <iostream> | |
template<typename T> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch('https://api.gazatu.xyz/trivia/questions', { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
body: JSON.stringify({ | |
category: 'TEST_CATEGORY', | |
question: 'TEST_QUESTION', | |
answer: 'TEST_ANSWER', | |
hint1: 'TEST_HINT1', // nullable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import Axios, { AxiosInstance } from 'axios'; | |
import { createContext, consume } from '../lib/context-utils'; | |
import { AuthContext } from './AuthProvider'; | |
export const ApiContext = createContext('apiContext', { | |
api: undefined as AxiosInstance | undefined, | |
auth: undefined as React.ContextType<typeof AuthContext> | undefined, | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import { createContext } from '../lib/context-utils'; | |
interface User { | |
[key: string]: any // idk yet | |
} | |
interface Auth { | |
token: string | |
user: User |