change(player): remove unused imports for injectnotes and provider
This commit is contained in:
parent
d15779076e
commit
6a82d34d8c
6 changed files with 3 additions and 22 deletions
|
|
@ -2,13 +2,10 @@ import { configure, addDecorator } from '@storybook/react';
|
|||
import { Provider } from 'react-redux';
|
||||
import store from '../app/store';
|
||||
import { MemoryRouter } from "react-router"
|
||||
import { PlayerProvider } from '../app/player/store'
|
||||
|
||||
const withProvider = (story) => (
|
||||
<Provider store={store}>
|
||||
<PlayerProvider>
|
||||
{ story() }
|
||||
</PlayerProvider>
|
||||
</Provider>
|
||||
)
|
||||
|
||||
|
|
@ -33,4 +30,4 @@ configure(
|
|||
require.context('../app', true, /\.stories\.js$/),
|
||||
],
|
||||
module
|
||||
);
|
||||
);
|
||||
|
|
@ -72,12 +72,10 @@ function LivePlayer ({
|
|||
|
||||
return (
|
||||
<PlayerContext.Provider value={contextValue}>
|
||||
<PlayerProvider>
|
||||
{!fullView && (<PlayerBlockHeader activeTab={activeTab} setActiveTab={setActiveTab} tabs={TABS} fullscreen={fullscreen}/>)}
|
||||
<div className={ styles.session } data-fullscreen={fullscreen}>
|
||||
<PlayerBlock />
|
||||
</div>
|
||||
</PlayerProvider>
|
||||
</PlayerContext.Provider>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { connect } from 'react-redux';
|
|||
import { Modal } from 'UI';
|
||||
import { toggleFullscreen, closeBottomBlock } from 'Duck/components/player';
|
||||
import { fetchList } from 'Duck/integrations';
|
||||
import { PlayerProvider, createWebPlayer } from 'Player';
|
||||
import { createWebPlayer } from 'Player';
|
||||
import { makeAutoObservable } from 'mobx';
|
||||
import withLocationHandlers from 'HOCs/withLocationHandlers';
|
||||
import { useStore } from 'App/mstore';
|
||||
|
|
@ -78,7 +78,6 @@ function WebPlayer(props: any) {
|
|||
|
||||
return (
|
||||
<PlayerContext.Provider value={contextValue}>
|
||||
<PlayerProvider>
|
||||
<>
|
||||
<PlayerBlockHeader
|
||||
// @ts-ignore TODO?
|
||||
|
|
@ -109,7 +108,6 @@ function WebPlayer(props: any) {
|
|||
) : null}
|
||||
</Modal>
|
||||
</>
|
||||
</PlayerProvider>
|
||||
</PlayerContext.Provider>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import { setCreateNoteTooltip, addNote, updateNote } from 'Duck/sessions';
|
|||
import stl from './styles.module.css';
|
||||
import { useStore } from 'App/mstore';
|
||||
import { toast } from 'react-toastify';
|
||||
import { injectNotes } from 'Player';
|
||||
import { fetchList as fetchSlack } from 'Duck/integrations/slack';
|
||||
import Select from 'Shared/Select';
|
||||
import { TeamBadge } from 'Shared/SessionListContainer/components/Notes'
|
||||
|
|
@ -86,7 +85,6 @@ function CreateNote({
|
|||
.then((r) => {
|
||||
toast.success('Note updated');
|
||||
notesStore.fetchSessionNotes(sessionId).then((notes) => {
|
||||
injectNotes(notes);
|
||||
onSuccess(editNote.noteId)
|
||||
updateNote(r);
|
||||
});
|
||||
|
|
@ -108,7 +106,6 @@ function CreateNote({
|
|||
onSuccess(r.noteId as unknown as string)
|
||||
toast.success('Note added');
|
||||
notesStore.fetchSessionNotes(sessionId).then((notes) => {
|
||||
injectNotes(notes);
|
||||
addNote(r);
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export default class ListWalker<T extends Timed> {
|
|||
|
||||
append(m: T): void {
|
||||
if (this.length > 0 && this.last && m.time < this.last.time) {
|
||||
console.error("Trying to append message with the less time then the list tail: ", m.time, 'vs', this.last.time, m)
|
||||
console.error("Trying to append message with the less time then the list tail:", m.time, 'vs', this.last.time, m)
|
||||
return
|
||||
}
|
||||
this.list.push(m);
|
||||
|
|
|
|||
|
|
@ -133,15 +133,6 @@ export default class WebPlayer extends Player {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: restore notes functionality
|
||||
// injectNotes(notes: Note[]) {
|
||||
// update({ notes })
|
||||
// }
|
||||
// filterOutNote(noteId: number) {
|
||||
// const { notes } = getState()
|
||||
// update({ notes: notes.filter((note: Note) => note.noteId !== noteId) })
|
||||
// }
|
||||
|
||||
toggleUserName = (name?: string) => {
|
||||
this.screen.cursor.showTag(name)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue