mirror of
https://github.com/plankanban/planka.git
synced 2025-12-25 01:11:49 +03:00
ref: Creating popups with hook, fix translation keys passing
This commit is contained in:
@@ -3,13 +3,18 @@ import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Icon, Menu } from 'semantic-ui-react';
|
||||
import { usePopup } from '../../lib/popup';
|
||||
|
||||
import Paths from '../../constants/Paths';
|
||||
import NotificationsPopup from './NotificationsPopup';
|
||||
import UserPopup from '../UserPopup';
|
||||
import NotificationsStep from './NotificationsStep';
|
||||
import UserStep from '../UserStep';
|
||||
|
||||
import styles from './Header.module.scss';
|
||||
|
||||
const POPUP_PROPS = {
|
||||
position: 'bottom right',
|
||||
};
|
||||
|
||||
const Header = React.memo(
|
||||
({
|
||||
project,
|
||||
@@ -30,6 +35,9 @@ const Header = React.memo(
|
||||
}
|
||||
}, [canEditProject, onProjectSettingsClick]);
|
||||
|
||||
const NotificationsPopup = usePopup(NotificationsStep, POPUP_PROPS);
|
||||
const UserPopup = usePopup(UserStep, POPUP_PROPS);
|
||||
|
||||
return (
|
||||
<div className={styles.wrapper}>
|
||||
{!project && (
|
||||
|
||||
Reference in New Issue
Block a user