Skip to content

Commit

Permalink
Merge pull request #542 from woowacourse-teams/refactor/#541-pin-imag…
Browse files Browse the repository at this point in the history
…e-button

[FE] Refactor/#541 비로그인 시 pin image button 숨기기
  • Loading branch information
GC-Park authored Oct 2, 2023
2 parents bbed204 + 17c9ae1 commit 7fe254c
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions frontend/src/pages/PinDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Flex from '../components/common/Flex';
import Space from '../components/common/Space';
import Text from '../components/common/Text';
import { useContext, useEffect, useState } from 'react';
import { Fragment, useContext, useEffect, useState } from 'react';
import { PinProps } from '../types/Pin';
import { getApi } from '../apis/getApi';
import { useSearchParams } from 'react-router-dom';
Expand Down Expand Up @@ -172,15 +172,19 @@ const PinDetail = ({

<Space size={2} />

<ImageInputLabel htmlFor="file">파일업로드</ImageInputLabel>
<ImageInputButton
id="file"
type="file"
name="image"
onChange={onPinImageFileChange}
/>

<PinImageContainer images={pin.images} />
{userToken && (
<Fragment>
<ImageInputLabel htmlFor="file">파일업로드</ImageInputLabel>
<ImageInputButton
id="file"
type="file"
name="image"
onChange={onPinImageFileChange}
/>

<PinImageContainer images={pin.images} />
</Fragment>
)}

<Space size={6} />

Expand Down

0 comments on commit 7fe254c

Please sign in to comment.