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

Assignment 7 #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Assignment 7 #6

wants to merge 3 commits into from

Conversation

KimKwon
Copy link
Member

@KimKwon KimKwon commented Dec 17, 2021

๐Ÿ“Œ ๋‚ด์šฉ

๊ธฐ๋ณธ๊ณผ์ œ

  • : ์„ธ๋ฏธ๋‚˜์—์„œ ๋‹ค๋ฃฌ ๋‚ด์šฉ๋“ค
  • : ์ด๋ฏธ์ง€ ๋ฏธ๋ฆฌ๋ณด๊ธฐ

๐Ÿ“Œ PR Point

<Outlet /> ์„ ์ฒ˜์Œ ์ ์šฉํ•ด๋ดค๋Š”๋ฐ ์ข‹์€ ๊ฒƒ ๊ฐ™์•„์šฉ
๋งˆ์ง€๋ง‰ ๊ณผ์ œ๊ฐ™๊ธฐ๋„ํ•˜๊ณ  ์‹ฑ์ˆญ์ƒ์ˆญ๋งน์ˆญํ•˜๋„ค์š”~


๐Ÿ“Œ ์Šคํฌ๋ฆฐ์ƒท

ezgif com-gif-maker (3)

@KimKwon KimKwon self-assigned this Dec 17, 2021
Copy link
Member

@100Gyeon 100Gyeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋งˆ์ง€๋ง‰ ๋ฆฌ๋ทฐ ๋‚จ๊ธฐ๋Š” ๋‚ ์ด ์˜ค๋‹ค๋‹ˆ..๐Ÿ˜ข 7์ฐจ ๊ณผ์ œ๊นŒ์ง€ ์ˆ˜๊ณ ํ–ˆ์–ด์šฉ !!

Comment on lines +299 to +307
const ThumbnailPreview = styled.div`
border-radius: 18px;
box-shadow: 5px 5px 10px 5px lightgray;
min-width: fit-content;
& > img {
max-width: 100%;
max-height: 150px;
}
`;
Copy link
Member

@100Gyeon 100Gyeon Dec 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

div ๋ถ€๋ถ„์— overflow: hidden;์ด๋ž‘ max-height: 150px;๋„ ์ถ”๊ฐ€ํ•ด ์ฃผ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์šฉ~!

  • before
    before
  • after
    after

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

div ๋ถ€๋ถ„์— overflow: hidden;์ด๋ž‘ max-height: 150px;๋„ ์ถ”๊ฐ€ํ•ด ์ฃผ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์šฉ~!

  • before
    before
  • after
    after

์ œ์ถœ ์ „์— ํ›„๋”ฑํ•˜๋Š๋ผ ์ด ๋ถ€๋ถ„์€ ์‹ ๊ฒฝ์„ ๋ชป์ผ๋„ค์š”ใ…Žใ…Ž ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค

Comment on lines +1 to +12
const encodeFileToBase64 = (fileBlob, onLoad) => {
const reader = new FileReader();
reader.readAsDataURL(fileBlob);
return new Promise((resolve) => {
reader.onload = () => {
onLoad(reader.result);
resolve();
};
});
};

export default encodeFileToBase64;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ €๋Š” ์„ธ๋ฏธ๋‚˜ ๋”ฐ๋ผ์„œ FormData API๋ฅผ ์‚ฌ์šฉํ–ˆ๋Š”๋ฐ, FileReader API๋กœ๋„ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋„ค์š” ๐Ÿ‘๐Ÿป
FileReader API๋กœ ๊ตฌํ˜„ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ๋” ํšจ์œจ์ ์ธ์ง€ ๊ถ๊ธˆํ•ด์š”!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ €๋Š” ์„ธ๋ฏธ๋‚˜ ๋”ฐ๋ผ์„œ FormData API๋ฅผ ์‚ฌ์šฉํ–ˆ๋Š”๋ฐ, FileReader API๋กœ๋„ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋„ค์š” ๐Ÿ‘๐Ÿป FileReader API๋กœ ๊ตฌํ˜„ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ๋” ํšจ์œจ์ ์ธ์ง€ ๊ถ๊ธˆํ•ด์š”!

์ €๋Š” ์‹ค์ œ๋กœ ์ด๋ฏธ์ง€๋ฅผ ์—…๋กœ๋“œํ•˜์ง€ ์•Š๊ณ  ๋ฏธ๋ฆฌ๋ณด๊ธฐ๋ฅผ ๋ณด๊ณ ์‹ถ์–ด์„œ ์ด ๋ฐฉ๋ฒ•์„ ์„ ํƒํ–ˆ์–ด์š”
๋‹ค๋งŒ FileReader API๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด base64 ์ธ์ฝ”๋”ฉ ๋ฐฉ์‹์œผ๋กœ ์ด๋ฏธ์ง€๊ฐ€ ๋ณด์—ฌ์ง€๊ธฐ ๋•Œ๋ฌธ์— ๋ฒˆ๋“ค ํฌ๊ธฐ๊ฐ€ ์ปค์งˆ ์ˆ˜ ์žˆ๋‹ค๋Š” ๋‹จ์ ์ด ์žˆ๊ฒ ๋„ค์šฉ
ํฌ๊ธฐ๊ฐ€ ์ž‘์€ ์ด๋ฏธ์ง€ ํŒŒ์ผ์ผ ๊ฒฝ์šฐ์— ์ ํ•ฉํ•œ ๋ฐฉ๋ฒ•์ด๋ผ๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค~!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ฐ€๋ ค์› ๋˜ ๊ณณ์„ ๋ฐ•๋ฐ• ๊ธ์–ด์ฃผ์…จ๋„ค์š” ,,^^ ์˜ค๋Š˜๋„ ํ•˜๋‚˜ ๋ฐฐ์›Œ๊ฐ‘๋‹ˆ๋‹ค๐Ÿ™‡๐Ÿปโ€โ™€๏ธ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants