Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔥 Remove index.ts for exporting Components #330

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
4 changes: 3 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -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<Ticker | null>(null)
Expand Down
1 change: 0 additions & 1 deletion src/components/Attachments.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render } from '@testing-library/react'
import React from 'react'
import Attachments from './Attachments'

describe('Attachment', function () {
Expand Down
1 change: 0 additions & 1 deletion src/components/Message.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen } from '@testing-library/react'
import React from 'react'
import Message from './Message'

describe('Message', function () {
Expand Down
3 changes: 1 addition & 2 deletions src/components/ReloadInfo.test.tsx
Original file line number Diff line number Diff line change
@@ -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 () {
Expand Down
5 changes: 0 additions & 5 deletions src/components/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
4 changes: 3 additions & 1 deletion src/views/ActiveView.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/views/ErrorView.test.tsx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/views/ErrorView.tsx
Original file line number Diff line number Diff line change
@@ -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)`
Expand Down
3 changes: 2 additions & 1 deletion src/views/InactiveView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
Expand Down
3 changes: 0 additions & 3 deletions src/views/index.ts

This file was deleted.