diff --git a/src/App.test.tsx b/src/App.test.tsx index 248f4c8..f729e5c 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import App from './App' import { render, screen } from '@testing-library/react' import * as api from './lib/api' diff --git a/src/App.tsx b/src/App.tsx index e4aa816..1ea839c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,8 +1,10 @@ import { FC, useEffect, useState } from 'react' import { Container, Dimmer, Loader } from 'semantic-ui-react' import { Settings, Ticker } from './lib/types' -import { ActiveView, ErrorView, InactiveView } from './views' import { getInit } from './lib/api' +import ErrorView from './views/ErrorView' +import ActiveView from './views/ActiveView' +import InactiveView from './views/InactiveView' const App: FC = () => { const [ticker, setTicker] = useState(null) diff --git a/src/components/Attachments.test.tsx b/src/components/Attachments.test.tsx index b5483b5..b3fad6d 100644 --- a/src/components/Attachments.test.tsx +++ b/src/components/Attachments.test.tsx @@ -1,5 +1,4 @@ import { render } from '@testing-library/react' -import React from 'react' import Attachments from './Attachments' describe('Attachment', function () { diff --git a/src/components/Message.test.tsx b/src/components/Message.test.tsx index df2bc7c..8ded2b2 100644 --- a/src/components/Message.test.tsx +++ b/src/components/Message.test.tsx @@ -1,5 +1,4 @@ import { render, screen } from '@testing-library/react' -import React from 'react' import Message from './Message' describe('Message', function () { diff --git a/src/components/ReloadInfo.test.tsx b/src/components/ReloadInfo.test.tsx index 7917aad..3e525cb 100644 --- a/src/components/ReloadInfo.test.tsx +++ b/src/components/ReloadInfo.test.tsx @@ -1,7 +1,6 @@ -import React from 'react' import { render, screen } from '@testing-library/react' import userEvent from '@testing-library/user-event' -import { ReloadInfo } from './index' +import ReloadInfo from './ReloadInfo' describe('ReloadInfo', function () { beforeAll(function () { diff --git a/src/components/index.ts b/src/components/index.ts deleted file mode 100644 index 8ed393c..0000000 --- a/src/components/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { default as About } from './About' -export { default as Credits } from './Credits' -export { default as DescriptionItem } from './DescriptionItem' -export { default as MessageList } from './MessageList' -export { default as ReloadInfo } from './ReloadInfo' diff --git a/src/index.tsx b/src/index.tsx index 7b50cf4..998bf40 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { createRoot } from 'react-dom/client' import App from './App' import 'semantic-ui-css/semantic.min.css' diff --git a/src/views/ActiveView.tsx b/src/views/ActiveView.tsx index 2b5258f..bba8ced 100644 --- a/src/views/ActiveView.tsx +++ b/src/views/ActiveView.tsx @@ -1,10 +1,12 @@ import { FC, useCallback, useState } from 'react' import { Container, Grid, Header, Sticky } from 'semantic-ui-react' import styled from 'styled-components' -import { About, MessageList, ReloadInfo } from '../components' import { spacing } from '../lib/theme' import { Ticker } from '../lib/types' import { isMobile } from '../lib/helper' +import About from '../components/About' +import ReloadInfo from '../components/ReloadInfo' +import MessageList from '../components/MessageList' const Wrapper = styled(Container)` padding: ${spacing.normal} 0; diff --git a/src/views/ErrorView.test.tsx b/src/views/ErrorView.test.tsx index a418adc..1e8bf77 100644 --- a/src/views/ErrorView.test.tsx +++ b/src/views/ErrorView.test.tsx @@ -1,6 +1,6 @@ import React from 'react' import { render, screen } from '@testing-library/react' -import { ErrorView } from './index' +import ErrorView from './ErrorView' describe('ErrorView', function () { const original = window.location diff --git a/src/views/ErrorView.tsx b/src/views/ErrorView.tsx index aae3215..b5a02d5 100644 --- a/src/views/ErrorView.tsx +++ b/src/views/ErrorView.tsx @@ -1,7 +1,7 @@ import { FC, useCallback } from 'react' import { Button, Container, Header, Icon, Segment } from 'semantic-ui-react' import styled from 'styled-components' -import { Credits } from '../components' +import Credits from '../components/Credits' import { spacing } from '../lib/theme' const Wrapper = styled(Container)` diff --git a/src/views/InactiveView.tsx b/src/views/InactiveView.tsx index e1335b6..bb082b7 100644 --- a/src/views/InactiveView.tsx +++ b/src/views/InactiveView.tsx @@ -2,7 +2,8 @@ import { FC } from 'react' import ReactMarkdown from 'react-markdown' import { Card, Container, Grid, Header, Icon, List } from 'semantic-ui-react' import styled from 'styled-components' -import { Credits, DescriptionItem } from '../components' +import Credits from '../components/Credits' +import DescriptionItem from '../components/DescriptionItem' import { DescriptionTypes, InactiveSettings } from '../lib/types' const Wrapper = styled(Container)` diff --git a/src/views/index.ts b/src/views/index.ts deleted file mode 100644 index c4608a5..0000000 --- a/src/views/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default as ActiveView } from './ActiveView' -export { default as ErrorView } from './ErrorView' -export { default as InactiveView } from './InactiveView'