Skip to content

Commit

Permalink
Merge pull request #189 from boostcampwm2023/hotfix/crud-error-fix
Browse files Browse the repository at this point in the history
[Hotfix] 일기 수정 시 에러 발생 수정, 3D view 일부 변경
  • Loading branch information
dbwhdtjr0457 authored Dec 1, 2023
2 parents 1aee6a5 + e72af46 commit 9ddde9c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
34 changes: 17 additions & 17 deletions FE/src/components/DiaryModal/DiaryUpdateModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,27 @@ function DiaryUpdateModal(props) {
} = useMutation(updateDiaryFn);

const {
// data: originData,
data: originData,
isLoading,
isError,
} = useQuery(
"diary",
() => getDiary(userState.accessToken, diaryState.diaryUuid),
{
onSuccess: (data) => {
setDiaryData({
...diaryData,
title: data.title,
content: data.content,
date: data.date,
tags: data.tags,
});
titleRef.current.value = data.title;
contentRef.current.value = data.content;
},
},
} = useQuery("diary", () =>
getDiary(userState.accessToken, diaryState.diaryUuid),
);

useEffect(() => {
if (originData) {
setDiaryData({
...diaryData,
title: originData.title,
content: originData.content,
date: originData.date,
tags: originData.tags,
});
titleRef.current && (titleRef.current.value = originData.title);
contentRef.current && (contentRef.current.value = originData.content);
}
}, [originData]);

if (isLoading)
return (
<ModalWrapper left='50%' width='40vw' height='65vh' opacity='0.3'>
Expand Down
7 changes: 5 additions & 2 deletions FE/src/pages/StarPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function StarPage() {
enableDamping={false}
enableZoom={false}
target={[0, 0, 0]}
rotateSpeed={-0.4}
/>
<StarView />
</Canvas>
Expand Down Expand Up @@ -169,8 +170,10 @@ function StarView() {

const material = new THREE.ShaderMaterial({
uniforms: {
color1: { value: new THREE.Color("#656990") },
color2: { value: new THREE.Color("#182683") },
// color1: { value: new THREE.Color("#656990") },
// color2: { value: new THREE.Color("#182683") },
color1: { value: new THREE.Color("#454980") },
color2: { value: new THREE.Color("#182663") },
gradientStart: { value: 0.001 },
},
vertexShader: `
Expand Down

0 comments on commit 9ddde9c

Please sign in to comment.