feat(frontend): added frontend
- Router: client side route handling with client side rendering - Toast: rought Toast handling for better UX and messaging - Auth: single point of truth for the Logged in user This commit doesnt not include the openapi generated code
This commit is contained in:
parent
0db41a440d
commit
08c910c193
28 changed files with 1994 additions and 0 deletions
17
frontend/src/api/index.ts
Normal file
17
frontend/src/api/index.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { Configuration, OpenapiOtherApi } from './generated';
|
||||
export * from './generated'
|
||||
|
||||
|
||||
const basePath = (() => {
|
||||
let u = new URL(location.href);
|
||||
u.pathname = "";
|
||||
u.hash = "";
|
||||
u.search = "";
|
||||
return u.toString().replace(/\/+$/, '');
|
||||
|
||||
})();
|
||||
|
||||
export const client = new OpenapiOtherApi(new Configuration({ basePath }));
|
||||
export default client;
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue