mirror of
https://github.com/wassname/talk.git
synced 2026-07-09 09:43:15 +08:00
Notifications working everywhere :D
This commit is contained in:
@@ -80,7 +80,7 @@ hr {
|
||||
.commentStream {
|
||||
/* prevent absolutely positioned final permalink popover from being clipped */
|
||||
padding-bottom: 50px;
|
||||
min-height: 775px;
|
||||
min-height: 500px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,10 +3,9 @@ import {SnackBar} from 'coral-ui';
|
||||
|
||||
const Notification = (props) => {
|
||||
if (props.notification.text) {
|
||||
|
||||
// setTimeout(() => {
|
||||
// props.clearNotification();
|
||||
// }, props.notifLength);
|
||||
setTimeout(() => {
|
||||
props.clearNotification();
|
||||
}, props.notifLength);
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {connect} from 'react-redux';
|
||||
import {compose} from 'react-apollo';
|
||||
import React, {Component} from 'react';
|
||||
import {addNotification} from '../actions/notification';
|
||||
import I18n from 'coral-framework/modules/i18n/i18n';
|
||||
|
||||
import {myCommentHistory} from 'coral-framework/graphql/queries';
|
||||
@@ -66,7 +65,7 @@ class SettingsContainer extends Component {
|
||||
}
|
||||
</TabContent>
|
||||
<TabContent show={activeTab === 1}>
|
||||
<BioContainer bio={userData.settings.bio} handleSave={this.handleSave} addNotification={this.props.addNotification} {...this.props} />
|
||||
<BioContainer bio={userData.settings.bio} handleSave={this.handleSave} {...this.props} />
|
||||
</TabContent>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -3,10 +3,14 @@ import styles from './SnackBar.css';
|
||||
|
||||
const SnackBar = ({children, className, position, ...attrs}) => {
|
||||
return (
|
||||
<div className={`${styles.SnackBar} ${className}`} style={{top: `${position}px`}} {...attrs} >
|
||||
{children}
|
||||
</div>
|
||||
<div className={`${styles.SnackBar} ${className}`}
|
||||
style={ position ? {top: `${position}px`} : fixedStyle}
|
||||
{...attrs} >
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const fixedStyle = {bottom: 0, top: 'auto'};
|
||||
|
||||
export default SnackBar;
|
||||
|
||||
Reference in New Issue
Block a user