Skip to content

Commit

Permalink
Merge pull request #173 from 9oooorm-bangbumde/develop-front
Browse files Browse the repository at this point in the history
Develop front
  • Loading branch information
lhg99 authored Aug 13, 2024
2 parents f170409 + 616f8a6 commit 8cd7ae8
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 66 deletions.
70 changes: 39 additions & 31 deletions FrontEnd/goorm/src/pages/Exercise/ExerciseMemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,37 +46,39 @@ const ExerciseMemo = ({dateInfo}:ExerciseMemoProps) => {
<MemoDetails>
<DetailsText>메모</DetailsText>
{!isAnyModalOpen() && (
<CKEditor
editor={ClassicEditor}
data={editorData}
onChange={(event, editor) => {
const data = editor.getData();
setEditorData(data);
if (dateInfo) {
const formattedDate = formatDateInfo(dateInfo);
setMemo({
content: data,
date: formattedDate,
});
}
}}
config={{
toolbar: [
"heading",
"|",
"bold",
"italic",
"link",
"bulletedList",
"numberedList",
"blockQuote",
"imageUpload",
],
ckfinder: {
uploadUrl: `${axiosInstance.defaults.baseURL}/s3/ck/upload`,
},
}}
/>
<EditorContainer>
<CKEditor
editor={ClassicEditor}
data={editorData}
onChange={(event, editor) => {
const data = editor.getData();
setEditorData(data);
if (dateInfo) {
const formattedDate = formatDateInfo(dateInfo);
setMemo({
content: data,
date: formattedDate,
});
}
}}
config={{
toolbar: [
"heading",
"|",
"bold",
"italic",
"link",
"bulletedList",
"numberedList",
"blockQuote",
"imageUpload",
],
ckfinder: {
uploadUrl: `${axiosInstance.defaults.baseURL}/s3/ck/upload`,
},
}}
/>
</EditorContainer>
)}
</MemoDetails>
</MemoContainer>
Expand Down Expand Up @@ -122,3 +124,9 @@ const DetailsText = styled.p`
font-size: 0.875rem;
text-align: center;
`;

const EditorContainer = styled.div`
.image {
width: 400px;
}
`
4 changes: 2 additions & 2 deletions FrontEnd/goorm/src/pages/FindGym/Map/Map.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
align-items: center;

input {
padding: .625rem;
padding: .3125rem .3125rem;
font-size: 1rem;
border: 1px solid #ccc;
border-radius: 5px;
margin-right: .625rem;
margin-left: .625rem;
height: 40px;
height: 1.875rem;
}

button {
Expand Down
73 changes: 40 additions & 33 deletions FrontEnd/goorm/src/pages/Food/FoodMemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,39 +47,40 @@ const FoodMemo = ({ dateInfo }: FoodMemoProps) => {
<MemoContainer>
<MemoDetails>
<DetailsText>메모</DetailsText>
{!isAnyModalOpen() && ( // 다른 모달이 열려있지 않을 때 CKeditor 표시
<CKEditor
editor={ClassicEditor}
data={editorData}
onChange={(event, editor) => {
const data = editor.getData();
setEditorData(data);
// 선택된 날짜에 대한 메모를 업데이트합니다
if (dateInfo) {
const formattedDate = formatDateInfo(dateInfo); // 날짜 형식화
setMemo({
content: data,
date: formattedDate,
});
}
}}
config={{
toolbar: [
"heading",
"|",
"bold",
"italic",
"link",
"bulletedList",
"numberedList",
"blockQuote",
"imageUpload",
],
ckfinder: {
uploadUrl: `${axiosInstance.defaults.baseURL}/s3/ck/upload`,
},
}}
/>
{!isAnyModalOpen() && (
<EditorContainer>
<CKEditor
editor={ClassicEditor}
data={editorData}
onChange={(event, editor) => {
const data = editor.getData();
setEditorData(data);
if (dateInfo) {
const formattedDate = formatDateInfo(dateInfo);
setMemo({
content: data,
date: formattedDate,
});
}
}}
config={{
toolbar: [
"heading",
"|",
"bold",
"italic",
"link",
"bulletedList",
"numberedList",
"blockQuote",
"imageUpload",
],
ckfinder: {
uploadUrl: `${axiosInstance.defaults.baseURL}/s3/ck/upload`,
},
}}
/>
</EditorContainer>
)}
</MemoDetails>
</MemoContainer>
Expand Down Expand Up @@ -125,3 +126,9 @@ const DetailsText = styled.p`
font-size: 0.875rem;
text-align: center;
`;

const EditorContainer = styled.div`
.image {
width: 400px;
}
`;

0 comments on commit 8cd7ae8

Please sign in to comment.