From 09c67f4870075ea0470ac5fd5c6f8fd132ac7f5b Mon Sep 17 00:00:00 2001 From: myl7 Date: Tue, 8 Feb 2022 17:53:15 +0800 Subject: [PATCH] format code and fix i18n prop passing in oauth guide step 3 --- pages/onedrive-vercel-index-oauth/step-1.tsx | 4 ++-- pages/onedrive-vercel-index-oauth/step-2.tsx | 4 ++-- pages/onedrive-vercel-index-oauth/step-3.tsx | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pages/onedrive-vercel-index-oauth/step-1.tsx b/pages/onedrive-vercel-index-oauth/step-1.tsx index c5a2587..f02f1b0 100644 --- a/pages/onedrive-vercel-index-oauth/step-1.tsx +++ b/pages/onedrive-vercel-index-oauth/step-1.tsx @@ -150,7 +150,7 @@ export default function OAuthStep1() { export async function getServerSideProps({ locale }) { return { props: { - ...(await serverSideTranslations(locale, ['common'])) - } + ...(await serverSideTranslations(locale, ['common'])), + }, } } diff --git a/pages/onedrive-vercel-index-oauth/step-2.tsx b/pages/onedrive-vercel-index-oauth/step-2.tsx index 4ef37c1..469539b 100644 --- a/pages/onedrive-vercel-index-oauth/step-2.tsx +++ b/pages/onedrive-vercel-index-oauth/step-2.tsx @@ -143,7 +143,7 @@ export default function OAuthStep2() { export async function getServerSideProps({ locale }) { return { props: { - ...(await serverSideTranslations(locale, ['common'])) - } + ...(await serverSideTranslations(locale, ['common'])), + }, } } diff --git a/pages/onedrive-vercel-index-oauth/step-3.tsx b/pages/onedrive-vercel-index-oauth/step-3.tsx index f18a454..d48924d 100644 --- a/pages/onedrive-vercel-index-oauth/step-3.tsx +++ b/pages/onedrive-vercel-index-oauth/step-3.tsx @@ -231,6 +231,7 @@ export async function getServerSideProps({ query, locale }) { props: { error: 'No auth code present', description: 'Where is the auth code? Did you follow step 2 you silly donut?', + ...(await serverSideTranslations(locale, ['common'])), }, } } @@ -244,6 +245,7 @@ export async function getServerSideProps({ query, locale }) { error: response.error, description: response.errorDescription, errorUri: response.errorUri, + ...(await serverSideTranslations(locale, ['common'])), }, } } @@ -256,7 +258,7 @@ export async function getServerSideProps({ query, locale }) { expiryTime, accessToken, refreshToken, - ...(await serverSideTranslations(locale, ['common'])) + ...(await serverSideTranslations(locale, ['common'])), }, } }