-
Notifications
You must be signed in to change notification settings - Fork 0
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
[#167] 커뮤니티 작성 페이지 api #168
Open
chan0310
wants to merge
4
commits into
main
Choose a base branch
from
feat/#167
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+158
−116
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,4 +46,4 @@ | |
"storybook": "7.0.18", | ||
"tsconfig-paths-webpack-plugin": "4.1.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 12 additions & 34 deletions
46
src/components/community/community_writing/ImageInputBox/IconBox/IconBox.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,32 +5,32 @@ import TitleBox from './TitleBox/TitleBox'; | |
|
||
interface FormData { | ||
previewImage: string[]; // 이미지 미리보기를 위한 string 배열 | ||
handleImageChange: (event: React.ChangeEvent<HTMLInputElement>) => void; // onChange 타입 변경 | ||
handleImageChange:(event: React.ChangeEvent<HTMLInputElement>) => void; // onChange 타입 변경 | ||
} | ||
|
||
const ImageInputBox = ({ previewImage, handleImageChange }: FormData) => { | ||
const ImageInputBox = ({previewImage,handleImageChange }:FormData) => { | ||
return ( | ||
<> | ||
<TitleBox /> | ||
<div style={{ display: 'flex' }}> | ||
{previewImage.length === 0 ? null : ( | ||
<> | ||
{previewImage.map((image, index) => ( | ||
<ImageBox key={index} index={index} image={image} /> | ||
))} | ||
</> | ||
)} | ||
<IconBox /> | ||
<input | ||
type="file" | ||
id="imageInput" | ||
name="previewImage" | ||
accept="image/*" | ||
multiple | ||
onChange={handleImageChange} | ||
hidden | ||
/> | ||
</div> | ||
<TitleBox fontSize={16}/> | ||
<div style={{display:"flex"}}> | ||
{previewImage.length === 0 ? null : ( | ||
<> | ||
{previewImage.map((image, index) => ( | ||
<ImageBox key={index} index={index} image={image}/> | ||
))} | ||
</> | ||
)} | ||
Comment on lines
+16
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이부분은 && 연산자를 사용해서 작성해도 좋을것 같아요! |
||
<IconBox/> | ||
<input | ||
type="file" | ||
id="imageInput" | ||
name="previewImage" | ||
accept="image/*" | ||
multiple | ||
onChange={handleImageChange} | ||
hidden | ||
/> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 4 additions & 7 deletions
11
src/components/community/community_writing/MainForm/MainForm.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import { NextPage } from 'next'; | ||
import React from 'react'; | ||
import React, { ChangeEvent, useState } from 'react'; | ||
import { SelectListSelect } from './SelectListBox.styles'; | ||
|
||
|
||
interface SelectListBoxProps { | ||
options: string[]; // options를 문자열 배열로 변경 | ||
chosen?: string | null; // chosen을 문자열 또는 null로 변경 | ||
onChange?: (event: React.ChangeEvent<HTMLSelectElement>) => void; // onChange 타입 변경 | ||
onChange?: (e: ChangeEvent<HTMLSelectElement>) => void; // onChange 타입 변경 | ||
Comment on lines
7
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 주석 내용이 반영되었다면 주석을 같이 지워주시면 좋을것 같습니다! |
||
} | ||
|
||
export const SelectListBox = ({ | ||
|
@@ -13,10 +15,10 @@ export const SelectListBox = ({ | |
onChange, | ||
}:SelectListBoxProps) => { | ||
return ( | ||
<select | ||
<SelectListSelect | ||
id="selectList" | ||
name="selectedValue" | ||
value={chosen || ''} // 선택한 값이 null이면 빈 문자열로 설정 | ||
value={chosen || 'err'} // 선택한 값이 null이면 빈 문자열로 설정 | ||
onChange={onChange} | ||
className={'custom-select'} | ||
style={{ | ||
|
@@ -34,6 +36,6 @@ export const SelectListBox = ({ | |
{option} | ||
</option> | ||
))} | ||
</select> | ||
</SelectListSelect> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
혹시 이부분은 공통 스타일에 없는 부분인가요?