hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | /** |
| 2 | * Demo sign-in shown on the login page: when `VITE_DEMO_LOGIN_USERNAME` and |
| 3 | * `VITE_DEMO_LOGIN_PASSWORD` are set at build time, the form opens filled |
| 4 | * with them and offers a one-click "sign in with the demo account". Unlike |
| 5 | * the dev auto sign-in this is meant for a deployed demo, so the values end |
| 6 | * up in the bundle — only ever set them for a demo school. |
| 7 | */ |
| 8 | export function demoCredentials(): { username: string; password: string } | null { |
| 9 | const username = import.meta.env.VITE_DEMO_LOGIN_USERNAME; |
| 10 | const password = import.meta.env.VITE_DEMO_LOGIN_PASSWORD; |
| 11 | return username && password ? { username, password } : null; |
| 12 | } |