From 3bd0093e00a6c9a988483488022f5562bd07ac3b Mon Sep 17 00:00:00 2001 From: Caleb Pollman Date: Thu, 16 Nov 2023 12:06:41 -0800 Subject: [PATCH] fix(codeql): remove unused imports (#4746) --- examples/next/next.config.js | 1 - .../src/features/InAppMessaging/Demo/utils.ts | 16 ++++++++-------- .../ButtonGroup/__tests__/ButtonGroup.test.tsx | 2 +- .../src/primitives/Link/__tests__/Link.test.tsx | 1 - 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/examples/next/next.config.js b/examples/next/next.config.js index 13a345b6bdb..974f63a96d0 100644 --- a/examples/next/next.config.js +++ b/examples/next/next.config.js @@ -1,4 +1,3 @@ -const path = require('path'); const { patchWebpackConfig } = require('next-global-css'); module.exports = { diff --git a/examples/react-native/src/features/InAppMessaging/Demo/utils.ts b/examples/react-native/src/features/InAppMessaging/Demo/utils.ts index 90c1a38df1b..5ad4c0a2a07 100644 --- a/examples/react-native/src/features/InAppMessaging/Demo/utils.ts +++ b/examples/react-native/src/features/InAppMessaging/Demo/utils.ts @@ -16,13 +16,13 @@ export interface GetDemoMessageParams { hasPrimaryButton: boolean; hasSecondaryButton: boolean; imageOrientation: ImageOrientation; - primaryButtonAction: MessageAction; - secondaryButtonAction: MessageAction; - layout: MessageLayout; + primaryButtonAction: InAppMessageAction; + secondaryButtonAction: InAppMessageAction; + layout: InAppMessageLayout; } -export const ACTIONS: MessageAction[] = ['CLOSE', 'DEEP_LINK', 'LINK']; -export const LAYOUTS: MessageLayout[] = [ +export const ACTIONS: InAppMessageAction[] = ['CLOSE', 'DEEP_LINK', 'LINK']; +export const LAYOUTS: InAppMessageLayout[] = [ 'BOTTOM_BANNER', 'CAROUSEL', 'FULL_SCREEN', @@ -39,9 +39,9 @@ const LANDSCAPE_IMAGE = const URL = 'https://ui.docs.amplify.aws/'; const getButton = ( - action: MessageAction, + action: InAppMessageAction, type: 'primary' | 'secondary' -): MessageButton => ({ +): InAppMessageButton => ({ title: `${type} - ${action.toLowerCase()}`, action, url: action === 'LINK' || action === 'DEEP_LINK' ? URL : undefined, @@ -57,7 +57,7 @@ function getDemoMessage({ layout, primaryButtonAction, secondaryButtonAction, -}: GetDemoMessageParams): Message { +}: GetDemoMessageParams): InAppMessage { return { layout, id: layout, diff --git a/packages/react/src/primitives/ButtonGroup/__tests__/ButtonGroup.test.tsx b/packages/react/src/primitives/ButtonGroup/__tests__/ButtonGroup.test.tsx index a4519520f5c..9e3d3574dbe 100644 --- a/packages/react/src/primitives/ButtonGroup/__tests__/ButtonGroup.test.tsx +++ b/packages/react/src/primitives/ButtonGroup/__tests__/ButtonGroup.test.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { Button } from '../../Button'; import { ButtonGroup } from '../ButtonGroup'; -import { ButtonGroupProps, PrimitiveProps } from '../../types'; +import { ButtonGroupProps } from '../../types'; import { ComponentClassName } from '@aws-amplify/ui'; import { testFlexProps, diff --git a/packages/react/src/primitives/Link/__tests__/Link.test.tsx b/packages/react/src/primitives/Link/__tests__/Link.test.tsx index ecc20b898aa..0f27bde9abd 100644 --- a/packages/react/src/primitives/Link/__tests__/Link.test.tsx +++ b/packages/react/src/primitives/Link/__tests__/Link.test.tsx @@ -110,7 +110,6 @@ describe('Link:', () => { expect(screen.getByText(/you are home/i)).toBeInTheDocument(); - const leftClick = { button: 0 }; const events = userEvent.setup(); await act(async () => { await events.click(screen.getByText(/about/i));