| 27 | }; |
| 28 | |
| 29 | function Error(code: 404 | 403 | 500 | 'bot') { |
| 30 | return ( |
| 31 | <div className={styles.errorView}> |
| 32 | <div className={styles.errorViewWrapper}> |
| 33 | <main className={styles.errorFlex}> |
| 34 | <p className={styles.errorCode}>{code}</p> |
| 35 | <div className={styles.errorSm}> |
| 36 | <div className={styles.errorBorder}> |
| 37 | <h1 className={styles.errorMsg}>{errorMap[code].message}</h1> |
| 38 | {errorMap[code].subtitle && ( |
| 39 | <p className={styles.subtitle}>{errorMap[code].subtitle}</p> |
| 40 | )} |
| 41 | </div> |
| 42 | <div className={styles.btnWrapper}> |
| 43 | <a className={styles.btnGoBack} href="/"> |
| 44 | Go back home |
| 45 | </a> |
| 46 | <a |
| 47 | href={`mailto:help@linen.dev?subject=${encodeURIComponent( |
| 48 | errorMap[code].message |
| 49 | )}`} |
| 50 | className={styles.btnSupport} |
| 51 | > |
| 52 | Contact support |
| 53 | </a> |
| 54 | </div> |
| 55 | </div> |
| 56 | </main> |
| 57 | </div> |
| 58 | </div> |
| 59 | ); |
| 60 | } |
| 61 | |
| 62 | export function Error403() { |
| 63 | return Error(403); |