mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
defaulting to & checking for null as advised by @mquellhorst
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user