-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api-codegen): replaced with new more excplicit codegen. Added re…
…act-query. Refactored app.tsx. Updated linting (#118) * feat(api-codegen): replaced with new more excplicit codegen. Added react-query. Refactored app.tsx. Updated linting * chore(merge): fixed merge issues --------- Co-authored-by: Wilhelm <wil.vold@icloud.com>
- Loading branch information
Showing
163 changed files
with
3,183 additions
and
2,147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,3 @@ jobs: | |
|
||
- name: Publish Container Image | ||
run: IMAGE_TAG=${{inputs.IMAGE_TAG}} docker compose push | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "CI" | ||
name: 'CI' | ||
|
||
on: | ||
push: | ||
|
@@ -27,4 +27,4 @@ jobs: | |
yarn test | ||
yarn build | ||
env: | ||
CI: false | ||
CI: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// default config | ||
module.exports = { | ||
trailingComma: 'es5', | ||
trailingComma: 'all', | ||
tabWidth: 2, | ||
semi: false, | ||
semi: true, | ||
singleQuote: true, | ||
endOfLine: 'auto', | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import styled from 'styled-components' | ||
import styled from 'styled-components'; | ||
|
||
const StyledOutletWrapper = styled.section` | ||
height: calc(100% - 128px); | ||
overflow: scroll; | ||
` | ||
export { StyledOutletWrapper as OutletWrapper } | ||
`; | ||
export { StyledOutletWrapper as OutletWrapper }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { render } from '@testing-library/react' | ||
import { App } from './App' | ||
import { render } from '@testing-library/react'; | ||
import { App } from './App'; | ||
|
||
test('renders without crashing', () => { | ||
render(<App />) | ||
}) | ||
render(<App />); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,25 @@ | ||
import { | ||
AuthenticatedTemplate, | ||
UnauthenticatedTemplate, | ||
useMsal, | ||
} from '@azure/msal-react' | ||
import { Outlet } from 'react-router-dom' | ||
import * as Styled from './App.styled' | ||
import AppBar from './features/AppBar/AppBar' | ||
import { Footer } from './features/Footer/Footer' | ||
import { NoAccess } from './pages/NoAccess/NoAccess' | ||
useMsalAuthentication, | ||
} from '@azure/msal-react'; | ||
import { InteractionType } from '@azure/msal-browser'; | ||
import { Layout } from './pages/Layout'; | ||
import { OpenAPI } from './api/generated'; | ||
import { apiConfig } from './auth/authConfig'; | ||
|
||
export function App() { | ||
const { instance } = useMsal() | ||
useMsalAuthentication(InteractionType.Redirect); | ||
OpenAPI.BASE = apiConfig.baseUrl; | ||
|
||
return ( | ||
<> | ||
<AuthenticatedTemplate> | ||
<AppBar title="PEPM" /> | ||
<Styled.OutletWrapper> | ||
<Outlet /> | ||
</Styled.OutletWrapper> | ||
<Footer text="All information is proprietary of Equinor © 2023 Equinor ASA" /> | ||
<Layout /> | ||
</AuthenticatedTemplate> | ||
<UnauthenticatedTemplate> | ||
<p>Not authenticated</p> | ||
<button onClick={() => instance.loginRedirect()}>Log in</button> | ||
<NoAccess /> | ||
<div>You are not authorized</div> | ||
</UnauthenticatedTemplate> | ||
</> | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* generated using openapi-typescript-codegen -- do no edit */ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
import type { ApiRequestOptions } from './ApiRequestOptions'; | ||
import type { ApiResult } from './ApiResult'; | ||
|
||
export class ApiError extends Error { | ||
public readonly url: string; | ||
public readonly status: number; | ||
public readonly statusText: string; | ||
public readonly body: any; | ||
public readonly request: ApiRequestOptions; | ||
|
||
constructor( | ||
request: ApiRequestOptions, | ||
response: ApiResult, | ||
message: string, | ||
) { | ||
super(message); | ||
|
||
this.name = 'ApiError'; | ||
this.url = response.url; | ||
this.status = response.status; | ||
this.statusText = response.statusText; | ||
this.body = response.body; | ||
this.request = request; | ||
} | ||
} |
Oops, something went wrong.