Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

develop -> main #79

Merged
merged 3 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/components/detail/PoseImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const FullImage = styled.div`
max-height: calc(100vh - 57px);
object-fit: contain;
}
`
`;

export default function PoseImage({ poseInfo } : {poseInfo: PoseInfo}) {
const likePoseIdArr = useFetchLikeList();
Expand All @@ -27,20 +27,20 @@ export default function PoseImage({ poseInfo } : {poseInfo: PoseInfo}) {
return (
<>
<PoseContainer>
<div>
<img onClick={openModal} src={`${process.env.REACT_APP_API_BASE_URL}${poseInfo.imageUrl}`} alt={poseInfo.imageUrl} />
<div role="button" onClick={openModal} tabIndex={0} onKeyDown={openModal}>
<img src={`${process.env.REACT_APP_API_BASE_URL}${poseInfo.imageUrl}`} alt={poseInfo.imageUrl} />
</div>
<LikeButton
likePoseIdArr={likePoseIdArr}
poseId={poseInfo.poseId}
type="DETAIL"
/>
/>
</PoseContainer>
<Modal modalRef={modalRef} hide={closeModal} hideOnClickOutside>
<FullImage>
<FullImage onClick={closeModal}>
<img src={`${process.env.REACT_APP_API_BASE_URL}${poseInfo.imageUrl}`} alt={poseInfo.imageUrl} />
</FullImage>
</Modal>
</>
</>
);
}
1 change: 1 addition & 0 deletions src/components/mypage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const ProfileSection = styled.div`

const PoseSection = styled.div`
padding-top: 14.8rem;
padding-bottom: 7rem;
`;

export default function MyPage() {
Expand Down
2 changes: 2 additions & 0 deletions src/constant/pose.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line import/prefer-default-export
export const MAX_IMG_COUNT = 500;
3 changes: 2 additions & 1 deletion src/service/AuthPoseService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import axios from 'axios';
import { PoseInfo } from '../types/PoseType';
import { MAX_IMG_COUNT } from '../constant/pose';

const API_BASE_URL = `${process.env.REACT_APP_API_BASE_URL}/api/v1` || 'https://server.poseplz.com/api/v1';

Expand All @@ -23,7 +24,7 @@ export default class AuthPoseService {
async fetchMyPoses() : Promise<PoseInfo[]> {
try {
const token = localStorage.getItem('accessToken')?.replace(/^"|"$/g, '');
const { data } = await this.instance.get('/members/me/poses', {
const { data } = await this.instance.get(`/members/me/poses?page=0&size=${MAX_IMG_COUNT}`, {
headers: {
Authorization: `Bearer ${token}`,
},
Expand Down