Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
MonPote committed Nov 4, 2024
1 parent 5eb81f4 commit 44bccd7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/react/databrowser/objects/MetadataSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ const MetadataSearch = ({ isMetadataType, errorZenkoMsg }: Props) => {
right: '10px',
cursor: 'pointer',
}}
//@ts-expect-error Need to improve typing on core-ui for including the event
onClick={reset}
/>
</SearchMetadataInputAndIcon>
Expand Down
5 changes: 4 additions & 1 deletion src/react/next-architecture/ui/AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export function useInstanceId() {

const instanceIds = user?.userData?.original?.profile?.instanceIds;

if (!instanceIds || instanceIds.length === 0) {
if (
!instanceIds ||
(Array.isArray(instanceIds) && instanceIds.length === 0)
) {
return '';
}

Expand Down
2 changes: 1 addition & 1 deletion src/react/next-architecture/ui/XCoreLibraryProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const InternalXcoreLibraryProvider = ({
}: {
moduleExports: Record<string, never>;
children: React.ReactNode;
}): React.ReactNode => {
}) => {
//@ts-expect-error fix this when you are working on it
xcoreLibraryGlobal.hooks = moduleExports['./xcoreLibrary'];
return <>{children}</>;
Expand Down
2 changes: 0 additions & 2 deletions src/react/ui-elements/EditableKeyValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export const AddButton = ({
overlay: 'Add',
placement: 'top',
}}
//@ts-expect-error fix this when you are working on it
icon={<Icon name="Add-plus" style={iconStyle} />}
/>
</>
Expand Down Expand Up @@ -200,7 +199,6 @@ export const SubButton = ({
overlay: 'Remove',
placement: 'top',
}}
//@ts-expect-error fix this when you are working on it
icon={<Icon name="Remove-minus" style={iconStyle} />}
/>
);
Expand Down
1 change: 1 addition & 0 deletions src/react/utils/testUtil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export const defaultUserData = {
groups: ['user', 'PlatformAdmin'],
original: {
id_token: 'idtoken',
session_state: null,
access_token: 'token',
token_type: 'bearer',
scope: 'openid profile email',
Expand Down

0 comments on commit 44bccd7

Please sign in to comment.