diff --git a/opentrons-ai-client/src/App.test.tsx b/opentrons-ai-client/src/App.test.tsx index 2ebf02bb515..03b731311c0 100644 --- a/opentrons-ai-client/src/App.test.tsx +++ b/opentrons-ai-client/src/App.test.tsx @@ -1,11 +1,12 @@ +import React from 'react' import { screen } from '@testing-library/react' import { describe, it } from 'vitest' import { renderWithProviders } from './__testing-utils__' -import App from './App' +import { App } from './App' -const render = () => { +const render = (): ReturnType => { return renderWithProviders() } diff --git a/opentrons-ai-client/src/App.tsx b/opentrons-ai-client/src/App.tsx index 4c7f50f1192..f31fbd35940 100644 --- a/opentrons-ai-client/src/App.tsx +++ b/opentrons-ai-client/src/App.tsx @@ -1,11 +1,9 @@ -import * as React from 'react' +import React from 'react' import { Flex, StyledText } from '@opentrons/components' -function App() { +export function App(): JSX.Element { return ( Opentrons AI ) } - -export default App diff --git a/opentrons-ai-client/src/components/Button/__tests__/Button.test.tsx b/opentrons-ai-client/src/components/Button/__tests__/Button.test.tsx deleted file mode 100644 index 053d645312e..00000000000 --- a/opentrons-ai-client/src/components/Button/__tests__/Button.test.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { render, screen } from '@testing-library/react' -import { describe, it, expect } from 'vitest' - -import { Button } from '../index' - -describe('Button', () => { - it('renders with the provided label', () => { - const label = 'Click me!' - render( -} diff --git a/opentrons-ai-client/src/main.tsx b/opentrons-ai-client/src/main.tsx index 584b9bc2777..466bd35e081 100644 --- a/opentrons-ai-client/src/main.tsx +++ b/opentrons-ai-client/src/main.tsx @@ -1,12 +1,14 @@ import React from 'react' - import ReactDOM from 'react-dom/client' +import { App } from './App' -import App from './App.tsx' -import './index.css' - -ReactDOM.createRoot(document.getElementById('root')!).render( - - - -) +const rootElement = document.getElementById('root') +if (rootElement) { + ReactDOM.createRoot(rootElement).render( + + + + ) +} else { + console.error('Root element not found') +} diff --git a/opentrons-ai-client/src/vite-env.d.ts b/opentrons-ai-client/src/vite-env.d.ts deleted file mode 100644 index 11f02fe2a00..00000000000 --- a/opentrons-ai-client/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/tsconfig-eslint.json b/tsconfig-eslint.json index 4468d4f6fd4..541feb786c0 100644 --- a/tsconfig-eslint.json +++ b/tsconfig-eslint.json @@ -19,6 +19,7 @@ "labware-designer/typings", "labware-library/src", "labware-library/typings", + "opentrons-ai-client/src", "shared-data/deck", "shared-data/js", "shared-data/protocol",