diff --git a/src/components/mainPageComponent/mainMiddelModalComponent/style.ts b/src/components/mainPageComponent/mainMiddelModalComponent/style.ts index 1ff9534..a7911d9 100644 --- a/src/components/mainPageComponent/mainMiddelModalComponent/style.ts +++ b/src/components/mainPageComponent/mainMiddelModalComponent/style.ts @@ -43,6 +43,7 @@ const styles = { max-height: 6vh; color: white; font-weight: bold; + text-align: left; `, HashTagContainer: styled.div` diff --git a/src/components/uploadPostComponent/uploadPostLeftComponent/style.ts b/src/components/uploadPostComponent/uploadPostLeftComponent/style.ts index 2c540d3..fe96512 100644 --- a/src/components/uploadPostComponent/uploadPostLeftComponent/style.ts +++ b/src/components/uploadPostComponent/uploadPostLeftComponent/style.ts @@ -86,6 +86,7 @@ const styles = { Image: styled.img` width: 100%; + max-height: 460px; object-fit: cover; `, diff --git a/src/components/uploadPostComponent/uploadPostRightComponent/style.ts b/src/components/uploadPostComponent/uploadPostRightComponent/style.ts index c1e1dde..d08e29f 100644 --- a/src/components/uploadPostComponent/uploadPostRightComponent/style.ts +++ b/src/components/uploadPostComponent/uploadPostRightComponent/style.ts @@ -143,6 +143,7 @@ const styles = { background-color: white; padding: 5px; border: none; + color: black; &:focus { outline: none; diff --git a/src/pages/myProfilePage/myProfilePage.tsx b/src/pages/myProfilePage/myProfilePage.tsx index e7d4c9f..b0d5203 100644 --- a/src/pages/myProfilePage/myProfilePage.tsx +++ b/src/pages/myProfilePage/myProfilePage.tsx @@ -92,7 +92,7 @@ const MyProfilePage: React.FC = () => { ); setPosts(response.data.result); - }, []); + }, [userId]); // 스크랩한 게시글들 가져오기 const getScrabPosts = useCallback(async () => { @@ -100,7 +100,7 @@ const MyProfilePage: React.FC = () => { `/v1/users/${userId}/posts/scrabs`, ); setScrabPosts(response.data.result); - }, []); + }, [userId]); // 유저들의 정보(닉네임, 프로필 이미지 등) 가져오기 const getUserInfo = useCallback(async () => { @@ -130,23 +130,29 @@ const MyProfilePage: React.FC = () => { }, [userId]); // 팔로우 하기 - const followUser = async (user: User) => { - setUserInfo({ ...user, following: true }); - try { - await PostAxiosInstance(`/v1/follows/users/${userId}`); - } catch (error) { - setUserInfo({ ...user, following: false }); - } - }; - - const unFollowUser = async (user: User) => { - setUserInfo({ ...user, following: false }); - try { - await DeleteAxiosInstance(`/v1/follows/users/${userId}`); - } catch (error) { + const followUser = useCallback( + async (user: User) => { setUserInfo({ ...user, following: true }); - } - }; + try { + await PostAxiosInstance(`/v1/follows/users/${userId}`); + } catch (error) { + setUserInfo({ ...user, following: false }); + } + }, + [userInfo], + ); + + const unFollowUser = useCallback( + async (user: User) => { + setUserInfo({ ...user, following: false }); + try { + await DeleteAxiosInstance(`/v1/follows/users/${userId}`); + } catch (error) { + setUserInfo({ ...user, following: true }); + } + }, + [userInfo], + ); const editProfile = async () => { try { diff --git a/src/pages/notFoundPage/style.ts b/src/pages/notFoundPage/style.ts index bedec48..efc3718 100644 --- a/src/pages/notFoundPage/style.ts +++ b/src/pages/notFoundPage/style.ts @@ -9,7 +9,7 @@ const styles = { display: flex; width: 100vw; height: 100vh; - over-flow: hidden; + overflow: hidden; `, Left: styled.div` flex: 1;