Skip to content

Commit

Permalink
feat: handling no bus, station error
Browse files Browse the repository at this point in the history
  • Loading branch information
noeulnight authored Oct 31, 2023
1 parent c9c9084 commit fab458e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/router/User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@ function User() {
if (data.role === undefined) errorHandling()
if (data.role !== 'USER') errorHandling()

if (data.boarding_bus.name === null) {
alert('버스 정보를 찾을 수 없습니다.')
window.location.href = '/'

return
}

if (data.destination_stop === null) {
alert('도착 정류장 정보를 찾을 수 없습니다.')
window.location.href = '/'

return
}


function generateOTP(otpauthURL: string): void {
if (!otpauthURL || otpauthURL === '') return console.error('otpauthURL is not defined')
Expand Down

0 comments on commit fab458e

Please sign in to comment.