1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00
vault-frontend/src/components/profile/ProfileSidebarMenu/index.tsx
2020-11-17 18:05:36 +07:00

28 lines
673 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React, { FC } from 'react';
import styles from './styles.module.scss';
import { Icon } from '~/components/input/Icon';
import { Link } from 'react-router-dom';
interface IProps {
path: string;
}
const ProfileSidebarMenu: FC<IProps> = ({ path }) => {
const cleaned = path.replace(/\/$/, '');
return (
<div className={styles.wrap}>
<Link className={styles.row} to={`${cleaned}/settings`}>
<Icon icon="settings" />
<span>Настройки</span>
</Link>
<div className={styles.row}>
<Icon icon="messages" />
<span>Сообщения</span>
</div>
</div>
);
};
export { ProfileSidebarMenu };