Skip to content

Commit 04818dd

Browse files
committed
Fix typing issues from ory
1 parent 93f2479 commit 04818dd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pages/login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const Login: NextPage = () => {
103103
// If the previous handler did not catch the error it's most likely a form validation error
104104
if (err.response?.status === 400) {
105105
// Yup, it is!
106-
setInitialFlow(err.response?.data)
106+
setInitialFlow(err.response?.data as LoginFlow | undefined)
107107
return
108108
}
109109

pages/verify.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ const Verification: NextPage = () => {
8888
switch (err.response?.status) {
8989
case 400:
9090
// Status code 400 implies the form validation had an error
91-
setInitialFlow(err.response?.data)
91+
setInitialFlow(err.response?.data as VerificationFlow | undefined)
9292
return
9393
case 410:
94-
const newFlowID = err.response.data.use_flow_id
94+
const newFlowID = (err.response.data as any).use_flow_id
9595
router
9696
// On submission, add the flow ID to the URL but do not navigate. This prevents the user loosing
9797
// their data when they reload the page.

0 commit comments

Comments
 (0)