fix: pass application to options component in overflow menu

This commit is contained in:
Antonella Sgarlatta
2021-08-09 11:47:10 -03:00
parent 7849de7e8f
commit e82e27ddb6
2 changed files with 5 additions and 2 deletions

View File

@@ -3,19 +3,21 @@ import { toDirective } from './utils';
import NotesIcon from '../../icons/il-notes.svg';
import { observer } from 'mobx-react-lite';
import { NotesOptionsPanel } from './NotesOptionsPanel';
import { WebApplication } from '@/ui_models/application';
type Props = {
application: WebApplication;
appState: AppState;
};
const MultipleSelectedNotes = observer(({ appState }: Props) => {
const MultipleSelectedNotes = observer(({ application, appState }: Props) => {
const count = appState.notes.selectedNotesCount;
return (
<div className="flex flex-col h-full items-center">
<div className="flex items-center justify-between p-4 w-full">
<h1 className="sk-h1 font-bold m-0">{count} selected notes</h1>
<NotesOptionsPanel appState={appState} />
<NotesOptionsPanel application={application} appState={appState} />
</div>
<div className="flex-grow flex flex-col justify-center items-center w-full max-w-md">
<NotesIcon className="block" />

View File

@@ -1,5 +1,6 @@
.h-full
multiple-selected-notes-panel.h-full(
application='self.application'
app-state='self.appState'
ng-if='self.state.showMultipleSelectedNotes'
)