From 2691a2ceec3d425007486604c46979dc523be82b Mon Sep 17 00:00:00 2001 From: J Taylor Date: Thu, 16 Sep 2021 21:47:55 +0100 Subject: [PATCH] fixed all imports to align to linter rules --- dailyjs/basic-call/components/App/App.js | 2 +- dailyjs/basic-call/components/Call/Room.js | 18 ++++++++++-------- dailyjs/basic-call/components/Prejoin/Intro.js | 4 ++-- dailyjs/basic-call/pages/index.js | 5 +++-- .../RecordingModal/RecordingModal.js | 2 +- dailyjs/shared/components/Aside/Aside.js | 2 +- dailyjs/shared/components/Aside/PeopleAside.js | 4 ++-- dailyjs/shared/components/Aside/index.js | 1 - dailyjs/shared/components/Audio/index.js | 3 ++- dailyjs/shared/components/Button/index.js | 1 - .../components/DeviceSelect/DeviceSelect.js | 2 +- .../shared/components/DeviceSelect/index.js | 1 - .../DeviceSelectModal/DeviceSelectModal.js | 4 ++-- .../components/DeviceSelectModal/index.js | 1 - dailyjs/shared/components/Field/index.js | 1 - .../shared/components/HairCheck/HairCheck.js | 4 ++-- dailyjs/shared/components/Input/index.js | 1 - dailyjs/shared/components/Modal/Modal.js | 2 +- .../{MuteButtons => MuteButton}/MuteButton.js | 2 +- .../{MuteButtons => MuteButton}/index.js | 1 - .../shared/components/ParticipantBar/index.js | 1 - dailyjs/shared/components/Tile/Tile.js | 2 +- .../components/Tile/{Video => }/Video.js | 0 dailyjs/shared/components/Tile/Video/index.js | 2 -- dailyjs/shared/components/Tile/index.js | 2 +- dailyjs/shared/components/Tray/index.js | 1 - .../shared/components/VideoContainer/index.js | 1 + .../components/WaitingRoom/WaitingRoomModal.js | 2 +- dailyjs/shared/components/Well/index.js | 1 - .../components/ChatAside/ChatAside.js | 4 ++-- 30 files changed, 35 insertions(+), 42 deletions(-) rename dailyjs/shared/components/{MuteButtons => MuteButton}/MuteButton.js (97%) rename dailyjs/shared/components/{MuteButtons => MuteButton}/index.js (55%) rename dailyjs/shared/components/Tile/{Video => }/Video.js (100%) delete mode 100644 dailyjs/shared/components/Tile/Video/index.js diff --git a/dailyjs/basic-call/components/App/App.js b/dailyjs/basic-call/components/App/App.js index f85e251..fab2cfb 100644 --- a/dailyjs/basic-call/components/App/App.js +++ b/dailyjs/basic-call/components/App/App.js @@ -4,7 +4,7 @@ import { useCallState } from '@dailyjs/shared/contexts/CallProvider'; import { useCallUI } from '@dailyjs/shared/hooks/useCallUI'; import PropTypes from 'prop-types'; -import { Room } from '../Call/Room'; +import Room from '../Call/Room'; import { Asides } from './Asides'; import { Modals } from './Modals'; diff --git a/dailyjs/basic-call/components/Call/Room.js b/dailyjs/basic-call/components/Call/Room.js index 3c26b50..7f8fffb 100644 --- a/dailyjs/basic-call/components/Call/Room.js +++ b/dailyjs/basic-call/components/Call/Room.js @@ -5,13 +5,15 @@ import { Container } from './Container'; import { Header } from './Header'; import { VideoGrid } from './VideoGrid'; -export const Room = () => ( - -
- - - - -); +export function Room() { + return ( + +
+ + + + + ); +} export default Room; diff --git a/dailyjs/basic-call/components/Prejoin/Intro.js b/dailyjs/basic-call/components/Prejoin/Intro.js index 2fe43bb..c281faf 100644 --- a/dailyjs/basic-call/components/Prejoin/Intro.js +++ b/dailyjs/basic-call/components/Prejoin/Intro.js @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { Button } from '@dailyjs/shared/components/Button'; +import Button from '@dailyjs/shared/components/Button'; import { Card, CardBody, @@ -8,7 +8,7 @@ import { } from '@dailyjs/shared/components/Card'; import Field from '@dailyjs/shared/components/Field'; import { TextInput, BooleanInput } from '@dailyjs/shared/components/Input'; -import { Well } from '@dailyjs/shared/components/Well'; +import Well from '@dailyjs/shared/components/Well'; import PropTypes from 'prop-types'; /** diff --git a/dailyjs/basic-call/pages/index.js b/dailyjs/basic-call/pages/index.js index da20ba5..e6107fb 100644 --- a/dailyjs/basic-call/pages/index.js +++ b/dailyjs/basic-call/pages/index.js @@ -8,8 +8,9 @@ import { WaitingRoomProvider } from '@dailyjs/shared/contexts/WaitingRoomProvide import getDemoProps from '@dailyjs/shared/lib/demoProps'; import PropTypes from 'prop-types'; import App from '../components/App'; -import { CreatingRoom } from '../components/Prejoin/CreatingRoom'; -import { Intro, NotConfigured } from '../components/Prejoin/Intro'; +import CreatingRoom from '../components/Prejoin/CreatingRoom'; +import Intro from '../components/Prejoin/Intro'; +import NotConfigured from '../components/Prejoin/NotConfigured'; /** * Index page diff --git a/dailyjs/recording/components/RecordingModal/RecordingModal.js b/dailyjs/recording/components/RecordingModal/RecordingModal.js index db1f108..50f4313 100644 --- a/dailyjs/recording/components/RecordingModal/RecordingModal.js +++ b/dailyjs/recording/components/RecordingModal/RecordingModal.js @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import { Button } from '@dailyjs/shared/components/Button'; +import Button from '@dailyjs/shared/components/Button'; import { CardBody } from '@dailyjs/shared/components/Card'; import Modal from '@dailyjs/shared/components/Modal'; import Well from '@dailyjs/shared/components/Well'; diff --git a/dailyjs/shared/components/Aside/Aside.js b/dailyjs/shared/components/Aside/Aside.js index 59fa9c3..4cf7f2c 100644 --- a/dailyjs/shared/components/Aside/Aside.js +++ b/dailyjs/shared/components/Aside/Aside.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { ReactComponent as IconClose } from '../../icons/close-sm.svg'; -import { Button } from '../Button'; +import Button from '../Button'; export const ASIDE_WIDTH = 380; diff --git a/dailyjs/shared/components/Aside/PeopleAside.js b/dailyjs/shared/components/Aside/PeopleAside.js index b595bad..db9da69 100644 --- a/dailyjs/shared/components/Aside/PeopleAside.js +++ b/dailyjs/shared/components/Aside/PeopleAside.js @@ -1,5 +1,5 @@ import React from 'react'; -import Aside from '@dailyjs/shared/components/Aside'; +import { Aside } from '@dailyjs/shared/components/Aside'; import { ReactComponent as IconCamOff } from '@dailyjs/shared/icons/camera-off-sm.svg'; import { ReactComponent as IconCamOn } from '@dailyjs/shared/icons/camera-on-sm.svg'; import { ReactComponent as IconMicOff } from '@dailyjs/shared/icons/mic-off-sm.svg'; @@ -8,7 +8,7 @@ import PropTypes from 'prop-types'; import { useCallState } from '../../contexts/CallProvider'; import { useParticipants } from '../../contexts/ParticipantsProvider'; import { useUIState } from '../../contexts/UIStateProvider'; -import { Button } from '../Button'; +import Button from '../Button'; export const PEOPLE_ASIDE = 'people'; diff --git a/dailyjs/shared/components/Aside/index.js b/dailyjs/shared/components/Aside/index.js index ab85567..072ca0e 100644 --- a/dailyjs/shared/components/Aside/index.js +++ b/dailyjs/shared/components/Aside/index.js @@ -1,3 +1,2 @@ -export { Aside as default } from './Aside'; export { Aside } from './Aside'; export { PeopleAside } from './PeopleAside'; diff --git a/dailyjs/shared/components/Audio/index.js b/dailyjs/shared/components/Audio/index.js index de613b3..2fc98bb 100644 --- a/dailyjs/shared/components/Audio/index.js +++ b/dailyjs/shared/components/Audio/index.js @@ -1,2 +1,3 @@ -export { Audio as default } from './Audio'; export { Audio } from './Audio'; +export { AudioTrack } from './AudioTrack'; +export { CombinedAudioTrack } from './CombinedAudioTrack'; diff --git a/dailyjs/shared/components/Button/index.js b/dailyjs/shared/components/Button/index.js index e229288..3fa135d 100644 --- a/dailyjs/shared/components/Button/index.js +++ b/dailyjs/shared/components/Button/index.js @@ -1,2 +1 @@ -export { Button } from './Button'; export { Button as default } from './Button'; diff --git a/dailyjs/shared/components/DeviceSelect/DeviceSelect.js b/dailyjs/shared/components/DeviceSelect/DeviceSelect.js index c089280..0502a05 100644 --- a/dailyjs/shared/components/DeviceSelect/DeviceSelect.js +++ b/dailyjs/shared/components/DeviceSelect/DeviceSelect.js @@ -1,6 +1,6 @@ import React from 'react'; import { useMediaDevices } from '@dailyjs/shared/contexts/MediaDeviceProvider'; -import { Field } from '../Field'; +import Field from '../Field'; import { SelectInput } from '../Input'; export const DeviceSelect = () => { diff --git a/dailyjs/shared/components/DeviceSelect/index.js b/dailyjs/shared/components/DeviceSelect/index.js index 8929c5c..4326925 100644 --- a/dailyjs/shared/components/DeviceSelect/index.js +++ b/dailyjs/shared/components/DeviceSelect/index.js @@ -1,2 +1 @@ export { DeviceSelect as default } from './DeviceSelect'; -export { DeviceSelect } from './DeviceSelect'; diff --git a/dailyjs/shared/components/DeviceSelectModal/DeviceSelectModal.js b/dailyjs/shared/components/DeviceSelectModal/DeviceSelectModal.js index 926ba85..c81570a 100644 --- a/dailyjs/shared/components/DeviceSelectModal/DeviceSelectModal.js +++ b/dailyjs/shared/components/DeviceSelectModal/DeviceSelectModal.js @@ -1,8 +1,8 @@ import React from 'react'; import Modal from '@dailyjs/shared/components/Modal'; import { useUIState } from '@dailyjs/shared/contexts/UIStateProvider'; -import { Button } from '../Button'; -import { DeviceSelect } from '../DeviceSelect'; +import Button from '../Button'; +import DeviceSelect from '../DeviceSelect'; export const DEVICE_MODAL = 'device'; diff --git a/dailyjs/shared/components/DeviceSelectModal/index.js b/dailyjs/shared/components/DeviceSelectModal/index.js index 22feecd..60adbfc 100644 --- a/dailyjs/shared/components/DeviceSelectModal/index.js +++ b/dailyjs/shared/components/DeviceSelectModal/index.js @@ -1,3 +1,2 @@ -export { DeviceSelectModal as default } from './DeviceSelectModal'; export { DeviceSelectModal } from './DeviceSelectModal'; export { DEVICE_MODAL } from './DeviceSelectModal'; diff --git a/dailyjs/shared/components/Field/index.js b/dailyjs/shared/components/Field/index.js index 5308bf3..b5baff8 100644 --- a/dailyjs/shared/components/Field/index.js +++ b/dailyjs/shared/components/Field/index.js @@ -1,2 +1 @@ export { Field as default } from './Field'; -export { Field } from './Field'; diff --git a/dailyjs/shared/components/HairCheck/HairCheck.js b/dailyjs/shared/components/HairCheck/HairCheck.js index e07307e..d5ea397 100644 --- a/dailyjs/shared/components/HairCheck/HairCheck.js +++ b/dailyjs/shared/components/HairCheck/HairCheck.js @@ -3,8 +3,8 @@ import Button from '@dailyjs/shared/components/Button'; import { DEVICE_MODAL } from '@dailyjs/shared/components/DeviceSelectModal/DeviceSelectModal'; import { TextInput } from '@dailyjs/shared/components/Input'; import Loader from '@dailyjs/shared/components/Loader'; -import { MuteButton } from '@dailyjs/shared/components/MuteButtons'; -import { Tile } from '@dailyjs/shared/components/Tile'; +import MuteButton from '@dailyjs/shared/components/MuteButton'; +import Tile from '@dailyjs/shared/components/Tile'; import { ACCESS_STATE_LOBBY } from '@dailyjs/shared/constants'; import { useCallState } from '@dailyjs/shared/contexts/CallProvider'; import { useMediaDevices } from '@dailyjs/shared/contexts/MediaDeviceProvider'; diff --git a/dailyjs/shared/components/Input/index.js b/dailyjs/shared/components/Input/index.js index c38d7b3..057037e 100644 --- a/dailyjs/shared/components/Input/index.js +++ b/dailyjs/shared/components/Input/index.js @@ -1,2 +1 @@ -export { TextInput as default } from './Input'; export { TextInput, BooleanInput, SelectInput } from './Input'; diff --git a/dailyjs/shared/components/Modal/Modal.js b/dailyjs/shared/components/Modal/Modal.js index 89d3f64..3e3442f 100644 --- a/dailyjs/shared/components/Modal/Modal.js +++ b/dailyjs/shared/components/Modal/Modal.js @@ -3,7 +3,7 @@ import classNames from 'classnames'; import noScroll from 'no-scroll'; import { createPortal } from 'react-dom'; import { ReactComponent as IconClose } from '../../icons/close-sm.svg'; -import { Button } from '../Button'; +import Button from '../Button'; import { Card, CardBody, CardFooter, CardHeader } from '../Card'; const transitionMs = 350; diff --git a/dailyjs/shared/components/MuteButtons/MuteButton.js b/dailyjs/shared/components/MuteButton/MuteButton.js similarity index 97% rename from dailyjs/shared/components/MuteButtons/MuteButton.js rename to dailyjs/shared/components/MuteButton/MuteButton.js index 501c83c..8eef6e1 100644 --- a/dailyjs/shared/components/MuteButtons/MuteButton.js +++ b/dailyjs/shared/components/MuteButton/MuteButton.js @@ -6,7 +6,7 @@ import { ReactComponent as IconMicOn } from '@dailyjs/shared/icons/mic-on-md.svg import classNames from 'classnames'; import PropTypes from 'prop-types'; import { useCallState } from '../../contexts/CallProvider'; -import { Button } from '../Button'; +import Button from '../Button'; export const MuteButton = ({ isMuted, mic = false, className, ...props }) => { const { callObject } = useCallState(); diff --git a/dailyjs/shared/components/MuteButtons/index.js b/dailyjs/shared/components/MuteButton/index.js similarity index 55% rename from dailyjs/shared/components/MuteButtons/index.js rename to dailyjs/shared/components/MuteButton/index.js index df9740c..da40de3 100644 --- a/dailyjs/shared/components/MuteButtons/index.js +++ b/dailyjs/shared/components/MuteButton/index.js @@ -1,2 +1 @@ export { MuteButton as default } from './MuteButton'; -export { MuteButton } from './MuteButton'; diff --git a/dailyjs/shared/components/ParticipantBar/index.js b/dailyjs/shared/components/ParticipantBar/index.js index 92bde7d..556ae53 100644 --- a/dailyjs/shared/components/ParticipantBar/index.js +++ b/dailyjs/shared/components/ParticipantBar/index.js @@ -1,2 +1 @@ export { ParticipantBar as default } from './ParticipantBar'; -export { ParticipantBar } from './ParticipantBar'; diff --git a/dailyjs/shared/components/Tile/Tile.js b/dailyjs/shared/components/Tile/Tile.js index 31c3924..2fcca38 100644 --- a/dailyjs/shared/components/Tile/Tile.js +++ b/dailyjs/shared/components/Tile/Tile.js @@ -4,7 +4,7 @@ import { ReactComponent as IconMicMute } from '@dailyjs/shared/icons/mic-off-sm. import classNames from 'classnames'; import PropTypes from 'prop-types'; import { DEFAULT_ASPECT_RATIO } from '../../constants'; -import { Video } from './Video'; +import Video from './Video'; import { ReactComponent as Avatar } from './avatar.svg'; const SM_TILE_MAX_WIDTH = 300; diff --git a/dailyjs/shared/components/Tile/Video/Video.js b/dailyjs/shared/components/Tile/Video.js similarity index 100% rename from dailyjs/shared/components/Tile/Video/Video.js rename to dailyjs/shared/components/Tile/Video.js diff --git a/dailyjs/shared/components/Tile/Video/index.js b/dailyjs/shared/components/Tile/Video/index.js deleted file mode 100644 index ff5c13f..0000000 --- a/dailyjs/shared/components/Tile/Video/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { Video as default } from './Video'; -export { Video } from './Video'; diff --git a/dailyjs/shared/components/Tile/index.js b/dailyjs/shared/components/Tile/index.js index 7059d99..ca181eb 100644 --- a/dailyjs/shared/components/Tile/index.js +++ b/dailyjs/shared/components/Tile/index.js @@ -1,2 +1,2 @@ export { Tile as default } from './Tile'; -export { Tile } from './Tile'; +export { Video } from './Video'; diff --git a/dailyjs/shared/components/Tray/index.js b/dailyjs/shared/components/Tray/index.js index 45e5fb6..0354e7d 100644 --- a/dailyjs/shared/components/Tray/index.js +++ b/dailyjs/shared/components/Tray/index.js @@ -1,3 +1,2 @@ -export { Tray as default } from './Tray'; export { Tray, TrayButton } from './Tray'; export { BasicTray } from './BasicTray'; diff --git a/dailyjs/shared/components/VideoContainer/index.js b/dailyjs/shared/components/VideoContainer/index.js index e69de29..73b64e2 100644 --- a/dailyjs/shared/components/VideoContainer/index.js +++ b/dailyjs/shared/components/VideoContainer/index.js @@ -0,0 +1 @@ +export { VideoContainer as default } from './VideoContainer'; diff --git a/dailyjs/shared/components/WaitingRoom/WaitingRoomModal.js b/dailyjs/shared/components/WaitingRoom/WaitingRoomModal.js index 05f2088..c036e2b 100644 --- a/dailyjs/shared/components/WaitingRoom/WaitingRoomModal.js +++ b/dailyjs/shared/components/WaitingRoom/WaitingRoomModal.js @@ -2,7 +2,7 @@ import React from 'react'; import Modal from '@dailyjs/shared/components/Modal'; import { useWaitingRoom } from '@dailyjs/shared/contexts/WaitingRoomProvider'; import PropTypes from 'prop-types'; -import { Button } from '../Button'; +import Button from '../Button'; import { WaitingParticipantRow } from './WaitingParticipantRow'; export const WaitingRoomModal = ({ onClose }) => { diff --git a/dailyjs/shared/components/Well/index.js b/dailyjs/shared/components/Well/index.js index c8a68c0..f92fb64 100644 --- a/dailyjs/shared/components/Well/index.js +++ b/dailyjs/shared/components/Well/index.js @@ -1,2 +1 @@ export { Well as default } from './Well'; -export { Well } from './Well'; diff --git a/dailyjs/text-chat/components/ChatAside/ChatAside.js b/dailyjs/text-chat/components/ChatAside/ChatAside.js index 2c88d3e..830731a 100644 --- a/dailyjs/text-chat/components/ChatAside/ChatAside.js +++ b/dailyjs/text-chat/components/ChatAside/ChatAside.js @@ -1,6 +1,6 @@ import React, { useEffect, useRef, useState } from 'react'; -import Aside from '@dailyjs/shared/components/Aside'; -import { Button } from '@dailyjs/shared/components/Button'; +import { Aside } from '@dailyjs/shared/components/Aside'; +import Button from '@dailyjs/shared/components/Button'; import { TextInput } from '@dailyjs/shared/components/Input'; import { useUIState } from '@dailyjs/shared/contexts/UIStateProvider'; import { useChat } from '../../contexts/ChatProvider';