(error: string)
| 29 | ); |
| 30 | |
| 31 | function getErrorMessage(error: string) { |
| 32 | switch (error) { |
| 33 | case 'private': |
| 34 | return 'The community you are trying to access is private.'; |
| 35 | case 'forbidden': |
| 36 | return 'You are not allowed to access this page.'; |
| 37 | case 'CredentialsSignin': |
| 38 | return 'Credentials are invalid.'; |
| 39 | default: |
| 40 | return 'An unexpected error occurred. Please try again later.'; |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | function Error({ error }: { error?: string }) { |
| 45 | if (!error) { |