Skip to content

Commit

Permalink
chore: fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Campos committed Jun 20, 2024
1 parent c2b6ba0 commit e43050a
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion frontend/src/amplifyconfiguration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ResourcesConfig } from 'aws-amplify';
import { env } from './env';
import { ResourcesConfig } from '@aws-amplify/core';

const ZONE = env.VITE_ZONE.toLocaleLowerCase();
const redirectUri = window.location.origin;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/BCHeader/definitions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface HeaderContainerProps {
isSideNavExpanded: boolean;
onClickSideNavExpand: Function;
onClickSideNavExpand(): () => object;
}
4 changes: 2 additions & 2 deletions frontend/src/components/OpeningScreenDataTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import './styles.scss';
import EmptySection from '../EmptySection';
import PaginationContext from '../../contexts/PaginationContext';
import { RecentOpening } from '../../types/RecentOpening';
import { TableHeader as TableHeaderType } from '../../types/TableHeader';
import { ITableHeader } from '../../types/TableHeader';

interface IOpeningScreenDataTable {
rows: RecentOpening[],
headers: TableHeaderType[],
headers: ITableHeader[],
setOpeningId: Function,
showSpatial: boolean
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/OpeningScreenDataTable/testData.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TableHeader } from "../../types/TableHeader";
import { ITableHeader } from "../../types/TableHeader";

export const headers: TableHeader[] = [
export const headers: ITableHeader[] = [
{
key: 'openingId',
header: 'Opening Id'
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/TableSkeleton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {
DataTableSkeleton
} from '@carbon/react';
import './styles.scss'
import { TableHeader } from '../../types/TableHeader';
import { ITableHeader } from '../../types/TableHeader';

interface Props {
headers: TableHeader[];
headers: ITableHeader[];
}

const TableSkeleton: React.FC<Props> = ({headers}) => (
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/services/AuthService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
signOut
} from 'aws-amplify/auth'
import { env } from '../env'
import { JwtPayload } from '@aws-amplify/core/internals/utils';

// Define a global variable to store the ID token
let authIdToken: string | null = null;
Expand Down Expand Up @@ -114,8 +113,8 @@ async function refreshToken (): Promise<FamLoginUser | undefined> {
*
*/
function parseToken(idToken: JWT | undefined, accessToken: JWT | undefined): FamLoginUser {
const decodedIdToken: JwtPayload | undefined = idToken?.payload;
const decodedAccessToken: JwtPayload | undefined = accessToken?.payload;
const decodedIdToken = idToken?.payload;
const decodedAccessToken = accessToken?.payload;
// Extract the first name and last name from the displayName and remove unwanted part
let displayName: string = '';
if (decodedIdToken && 'custom:idp_display_name' in decodedIdToken) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/types/OpeningPerYearChart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export interface OpeningPerYearChart {
group: string;
key: string;
value: string;
};
}
2 changes: 1 addition & 1 deletion frontend/src/utils/ThemeFunction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const toggleTheme = (theme: string, setTheme: Function)=>{
export const toggleTheme = (theme: string, setTheme: React.Dispatch<React.SetStateAction<string>>)=>{
if (theme === 'g10') {
setTheme('g100');
localStorage.setItem('mode', 'dark');
Expand Down

0 comments on commit e43050a

Please sign in to comment.