mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 21:38:35 +03:00
Apply further cleanup and renaming
This commit is contained in:
@@ -128,9 +128,8 @@ class Dashboard extends React.Component {
|
||||
highlighted={this.props.app.highlighted}
|
||||
mapAnchor={this.props.app.mapAnchor}
|
||||
|
||||
uiStyle={this.props.ui.style}
|
||||
dom={this.props.ui.dom}
|
||||
isView2d={this.props.ui.flags.isView2d}
|
||||
groupColors={this.props.ui.style.groupColors}
|
||||
|
||||
select={this.handleSelect}
|
||||
highlight={this.handleHighlight}
|
||||
|
||||
@@ -27,19 +27,41 @@ export default class Notification extends React.Component{
|
||||
)
|
||||
}
|
||||
|
||||
renderNotificationContent(notification) {
|
||||
const { type, message, items } = notification;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className={`message ${type}`}>
|
||||
{`${message}`}
|
||||
</div>
|
||||
<div className={`details ${this.state.isExtended}`}>
|
||||
{(items !== null) ? this.renderItems(items) : ''}
|
||||
</div>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
|
||||
render() {
|
||||
if (this.props.isNotification) {
|
||||
|
||||
return (
|
||||
<div className={`notification-wrapper`}>
|
||||
{this.props.notifications.map(notification => (
|
||||
<div className='notification' onClick={() => this.toggleDetails() }>
|
||||
<button onClick={() => this.props.toggle()} className="side-menu-burg over-white is-active"><span /></button>
|
||||
<div className={`message ${notification.type}`}>{`${notification.message}`}</div>
|
||||
<div className={`details ${this.state.isExtended}`}>
|
||||
{(notification.items !== null) ? this.renderItems(notification.items) : ''}
|
||||
{this.props.notifications.map((notification) => {
|
||||
|
||||
return (
|
||||
<div className='notification' onClick={() => this.toggleDetails() }>
|
||||
<button
|
||||
onClick={() => this.props.toggle()}
|
||||
className="side-menu-burg over-white is-active"
|
||||
>
|
||||
<span />
|
||||
</button>
|
||||
{this.renderNotificationContent(notification)}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
);
|
||||
})
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -21,14 +21,15 @@ class Viewport extends React.Component {
|
||||
highlighted: this.props.highlighted,
|
||||
getCategoryGroup: this.props.getCategoryGroup,
|
||||
getCategoryGroupColor: this.props.getCategoryGroupColor,
|
||||
select: this.props.select,
|
||||
mapAnchor: this.props.mapAnchor
|
||||
}
|
||||
const ui = {
|
||||
style: this.props.uiStyle,
|
||||
groupColors: this.props.groupColors,
|
||||
dom: this.props.dom
|
||||
}
|
||||
|
||||
this.map = new Map(app, ui, this.props.select);
|
||||
this.map = new Map(app, ui);
|
||||
this.map.update(domain, app);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user