From 5d274a833660a5bcbb893ae6e98cce3b64474e44 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 15 Nov 2022 04:43:26 -0800 Subject: [PATCH] Add typing to cookieData --- pages/_app.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/_app.tsx b/pages/_app.tsx index e384868d..91590938 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -11,7 +11,7 @@ import "../styles/globals.scss" function MyApp({ Component, pageProps }: AppProps) { const cookie = getCookie("account") - const cookieData = cookie ? JSON.parse(cookie as string) : null + const cookieData: AccountCookie = cookie ? JSON.parse(cookie as string) : null useEffect(() => { if (cookie) { @@ -19,7 +19,7 @@ function MyApp({ Component, pageProps }: AppProps) { accountState.account.authorized = true accountState.account.user = { - id: cookieData.user_id, + id: cookieData.userId, username: cookieData.username, picture: "", element: "",