Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix: 마이페이지 내 티스토리 연결 기능 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
jeonjeunghoon committed Mar 11, 2024
1 parent 0aaf6ce commit 4368706
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 30 deletions.
29 changes: 2 additions & 27 deletions frontend/src/components/ConnectionSection/ConnectionSection.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MediumLogoIcon, NotionIcon, TistoryLogoIcon } from 'assets/icons';
import { MediumLogoIcon, NotionIcon } from 'assets/icons';
import Button from 'components/@common/Button/Button';
import Input from 'components/@common/Input/Input';
import { ConnectionPlatforms } from 'constants/components/myPage';
Expand All @@ -10,12 +10,11 @@ import { useConnect } from './useConnect';
import { MAX_WIDTH } from 'constants/style';

type Props = {
tistory: TistoryConnection;
medium: MediumConnection;
notion: NotionConnection;
};

const ConnectionSection = ({ tistory, medium, notion }: Props) => {
const ConnectionSection = ({ medium, notion }: Props) => {
const { inputRef, escapeInput, isInputOpen, openInput, resetInput, isError, setIsError } =
useUncontrolledInput();
const { requestStoreMediumInfo, redirect, disconnect } = useConnect();
Expand All @@ -41,30 +40,6 @@ const ConnectionSection = ({ tistory, medium, notion }: Props) => {
<S.ConnectionContainer>
<S.ContentContainerTitle>블로그와 연결하기</S.ContentContainerTitle>
<S.ConnectionList>
<S.ConnectionItem>
<S.IconContainer>
<TistoryLogoIcon width={40} height={40} />
<S.PlatformTitle>티스토리</S.PlatformTitle>
</S.IconContainer>
{tistory.isConnected ? (
<Button
size='small'
onClick={() => disconnect(ConnectionPlatforms.tistory)}
aria-label='티스토리 연결 해제하기'
>
해제하기
</Button>
) : (
<Button
variant='secondary'
size='small'
onClick={() => redirect(ConnectionPlatforms.tistory)}
aria-label='티스토리 연결하기'
>
연결하기
</Button>
)}
</S.ConnectionItem>
<S.ConnectionItem>
<S.IconContainer>
<MediumLogoIcon width={40} height={40} />
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/pages/MyPage/MyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Link } from 'react-router-dom';
import { css, styled } from 'styled-components';

const MyPage = () => {
const { isLoading, name, tistory, medium, notion } = useMember();
const { isLoading, name, medium, notion } = useMember();
const { goSpacePage } = usePageNavigate();

if (isLoading)
Expand All @@ -22,7 +22,7 @@ const MyPage = () => {
</S.SpinnerContainer>
);

if (!name || !tistory || !medium || !notion) return null;
if (!name || !medium || !notion) return null;

return (
<S.Section>
Expand All @@ -40,7 +40,7 @@ const MyPage = () => {
<>
<Profile name={name} />
<S.ContentContainer>
<ConnectionSection tistory={tistory} medium={medium} notion={notion} />
<ConnectionSection medium={medium} notion={notion} />
</S.ContentContainer>
</>
) : (
Expand Down

0 comments on commit 4368706

Please sign in to comment.