defaulting to & checking for null as advised by @mquellhorst

This commit is contained in:
luxumbra
2021-11-19 13:43:36 +00:00
committed by Alec LaLonde
parent a50b7a186d
commit c6b4163f23

View File

@@ -65,10 +65,10 @@ type MarketProps = {
};
export const Seed = (): ReactElement => {
const [token, setToken] = useState<TokenDataProps | undefined>();
const [token, setToken] = useState<TokenDataProps | null>(null);
useEffect(() => {
if (typeof token !== 'undefined') return;
if (token !== null) return;
(async () => {
try {
const tokenResponse = await fetch(