Skip to content

Commit

Permalink
Merge pull request #489 from DimRux/issue482_branch
Browse files Browse the repository at this point in the history
[#482] remove a button (icon) of an unrealized feature
  • Loading branch information
fey authored Jun 6, 2024
2 parents c90bbf6 + 8d27cb2 commit 846d79e
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions frontend/src/pages/profile/index.jsx
Original file line number Diff line number Diff line change
@@ -1,46 +1,28 @@
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useDispatch, useSelector } from 'react-redux';
import { useParams } from 'react-router-dom';

import { Link45deg } from 'react-bootstrap-icons';
import Button from 'react-bootstrap/Button';
import Container from 'react-bootstrap/Container';
import Row from 'react-bootstrap/Row';
import { CSSTransition, TransitionGroup } from 'react-transition-group';

import { actions } from '../../slices/modalSlice.js';
import { fetchUserSnippets } from '../../slices/snippetsSlice.js';

import NotFoundPage from '../404';
import NewSnippetForm from './NewSnippetForm.jsx';
import SnippetCard from './SnippetCard.jsx';

function ProfileLayout({ data, isEditable }) {
const { t } = useTranslation();
const dispatch = useDispatch();
const { user, snippets } = data;

const guestUser = localStorage.getItem('guestUserData');

const handleInDevelopment = () => {
dispatch(actions.openModal({ type: 'inDevelopment' }));
};
// TODO: добавить возможность делится профилем

return (
<div className="page-bg-image">
<Container className="py-5">
<div className="d-flex align-items-start">
{!guestUser && <h1 className="display-5">{user.username}</h1>}
<Button
className="btn-icon-only"
onClick={handleInDevelopment}
size="sm"
variant="nofill-body"
>
<Link45deg />
<span className="visually-hidden">{t('profileActions.share')}</span>
</Button>
</div>

<Row
Expand Down

0 comments on commit 846d79e

Please sign in to comment.