mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-18 02:19:09 +00:00
Reach parity with last web iteration. (#162)
* feat: add Api and Session contexts * feat(web): add machinery/new-session * feat(web): add servers page * chore(web): AppRouter spacing/ordering * feat(web): add picker, missing update-roles call for now * feat(web): add picker saves * chore: add roleTransactions tests * feat(web): add auth/login
This commit is contained in:
parent
f65779f925
commit
cd448b56c9
20 changed files with 567 additions and 7 deletions
11
packages/web/src/api-context/getDefaultApiUrl.ts
Normal file
11
packages/web/src/api-context/getDefaultApiUrl.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
export const getDefaultApiUrl = (host: string = window.location.hostname) => {
|
||||
if (/roleypoly.com$/.test(host)) {
|
||||
return 'https://api-prod.roleypoly.com';
|
||||
} else if (/roleypoly\.pages\.dev$/.test(host)) {
|
||||
return 'https://api-stage.roleypoly.com';
|
||||
} else if (/\blocalhost|127\.0\.0\.1\b/.test(host)) {
|
||||
return 'http://localhost:6609';
|
||||
} else {
|
||||
return 'https://api-prod.roleypoly.com';
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue