Skip to content
This repository was archived by the owner on Mar 28, 2024. It is now read-only.

Commit c949e89

Browse files
committed
refactor: return to named exports
1 parent 417e9e0 commit c949e89

File tree

12 files changed

+37
-29
lines changed

12 files changed

+37
-29
lines changed

.eslintrc.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"plugin:@typescript-eslint/eslint-recommended",
2020
"plugin:@typescript-eslint/recommended",
2121
"plugin:prettier/recommended",
22+
"prettier",
2223
"prettier/@typescript-eslint",
2324
"prettier/react",
2425
"airbnb-typescript",
@@ -36,9 +37,6 @@
3637
"@typescript-eslint/no-explicit-any": "off",
3738
"@typescript-eslint/indent": "off",
3839
"prettier/prettier": ["error", {}, { "usePrettierrc": true }],
39-
"react/jsx-wrap-multilines": [
40-
"error",
41-
{ "declaration": false, "assignment": false }
42-
]
40+
"react/jsx-wrap-multilines": ["error", { "declaration": false, "assignment": false }]
4341
}
4442
}

packages/client/src/components/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
33
import ApolloClient from 'apollo-boost';
44
import { ApolloProvider } from '@apollo/react-hooks';
55
import { CssBaseline } from '@material-ui/core';
6-
import Home from './Home';
6+
import { Home } from './Home';
77

88
export default function App() {
99
const client = new ApolloClient({

packages/client/src/components/Home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const useStyles = makeStyles((theme: Theme) => ({
1212
},
1313
}));
1414

15-
export default function Home() {
15+
export function Home() {
1616
const classes = useStyles();
1717

1818
return (

packages/client/src/components/episodes/EpisodeItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface EpisodeItemProps {
77
episode: Episode;
88
}
99

10-
export default function EpisodeItem(props: EpisodeItemProps) {
10+
export function EpisodeItem(props: EpisodeItemProps) {
1111
const { episode } = props;
1212

1313
return (

packages/client/src/components/episodes/EpisodeList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import { Grid, GridProps } from '@material-ui/core';
33
import { makeStyles } from '@material-ui/core/styles';
44
import { EpisodeConnection } from '../../interfaces';
5-
import EpisodeItem from './EpisodeItem';
5+
import { EpisodeItem } from './EpisodeItem';
66

77
interface EpisodeListProps {
88
episodes: EpisodeConnection;
@@ -45,7 +45,7 @@ function GridBackground(props: StyleProps & Omit<GridProps, keyof StyleProps>) {
4545
);
4646
}
4747

48-
export default function EpisodeList(props: EpisodeListProps) {
48+
export function EpisodeList(props: EpisodeListProps) {
4949
const { episodes } = props;
5050

5151
return (
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
import EpisodeList from './EpisodeList';
2-
3-
export default EpisodeList;
1+
export { EpisodeList } from './EpisodeList';

packages/client/src/components/podcast/AddPodcastFab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ interface CreateOneQueueInput {
4545
queue: Queue;
4646
}
4747

48-
export default function AddPodcastFab() {
48+
export function AddPodcastFab() {
4949
const classes = useStyles();
5050
const [open, setOpen] = useState(false);
5151
const { register, handleSubmit } = useForm<FormData>();

packages/client/src/components/podcast/PodcastCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import clsx from 'clsx';
2525
import { gql } from 'apollo-boost';
2626
import { useMutation } from '@apollo/react-hooks';
2727
import { Podcast } from '../../interfaces';
28-
import EpisodeList from '../episodes';
28+
import { EpisodeList } from '../episodes';
2929

3030
interface PodcastProps {
3131
podcast: Podcast;
@@ -60,7 +60,7 @@ const useStyles = makeStyles((theme: Theme) => ({
6060
},
6161
}));
6262

63-
export default function PodcastCard(props: PodcastProps) {
63+
export function PodcastCard(props: PodcastProps) {
6464
const { podcast } = props;
6565
const [anchorElement, setAnchorElement] = useState<null | HTMLElement>(null);
6666
const [visible, setVisible] = useState(true);

packages/client/src/components/podcast/PodcastList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const GET_PODCASTS = gql`
5151
}
5252
`;
5353

54-
export default function PodcastList() {
54+
export function PodcastList() {
5555
const { loading, data } = useQuery<Podcasts>(GET_PODCASTS);
5656

5757
return (
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export { default as AddPodcastFab } from './AddPodcastFab';
2-
export { default as PodcastCard } from './PodcastCard';
3-
export { default as PodcastList } from './PodcastList';
1+
export { AddPodcastFab } from './AddPodcastFab';
2+
export { PodcastCard } from './PodcastCard';
3+
export { PodcastList } from './PodcastList';

0 commit comments

Comments
 (0)