Skip to content

Commit

Permalink
🐛fix: 메인페이지 이미지 크기 조정 및 auth 에러 메세지 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
heejung0413 committed Jul 26, 2024
1 parent 1e058c1 commit 2a51b89
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 25 deletions.
6 changes: 2 additions & 4 deletions src/components/RetroList/ContentsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { patchRetrospective } from '@/api/retrospectivesApi/patchRetrospective';
import { UserServices } from '@/api/services/User';
import Thumbnail from '@/assets/Thumbnail.png';
import Modal from '@/components/RetroList/Modal';
import { useCustomToast } from '@/hooks/useCustomToast';
import * as S from '@/styles/RetroList/ContentsList.styles';

interface Content {
Expand Down Expand Up @@ -54,7 +53,6 @@ export const convertToLocalTime = (dateString: string | number | Date) => {
const ContentList: React.FC<ContentListProps> = ({ data, viewMode, searchData, setBookmarkUpdate }) => {
// const [contentData, setContentData] = useState<Content[]>(data); 받아온데이터
const [openModalId, setOpenModalId] = useState<number | null>(null);
const toast = useCustomToast();
const [image, setImage] = useState<{ [key: number]: string }>({});
const [user, setUser] = useState<UserData>();
const [isLoading, setIsLoading] = useState<boolean>(true);
Expand All @@ -64,7 +62,7 @@ const ContentList: React.FC<ContentListProps> = ({ data, viewMode, searchData, s
const data = await UserServices.get();
setUser(data.data);
} catch (error) {
toast.error(error);
console.error(error);
}
};

Expand All @@ -76,7 +74,7 @@ const ContentList: React.FC<ContentListProps> = ({ data, viewMode, searchData, s
await patchRetrospective(requestData);
setBookmarkUpdate(prev => !prev);
} catch (error) {
toast.error(error);
console.error(error);
}
};

Expand Down
4 changes: 2 additions & 2 deletions src/components/alarm/Alarm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const Alarm = () => {
const data = await UserServices.get();
setUser(data.data);
} catch (error) {
toast.error(error);
console.error(error);
}
};

Expand Down Expand Up @@ -88,7 +88,7 @@ const Alarm = () => {
await NotificationServices.readPost({ notificationId: notificationId });
setRender(prev => !prev);
} catch {
toast.error('error');
console.error('error');
}
};

Expand Down
4 changes: 2 additions & 2 deletions src/components/home/MainDesign.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ const MainDesign = () => {
>
Moving Forward from the Past
</Text> */}
<Image src={main} width={{ base: '70%', md: '40%' }} margin="0 auto" marginTop={100} />
<Image src={main} width={{ base: '70%', md: '30%' }} margin="0 auto" marginTop={100} />
<Flex
padding="0 auto"
margin={{ md: '20px auto', base: '10px' }}
justifyContent="center"
fontSize={{ md: '20px', base: '15px' }}
flexDirection="column"
>
<Flex justifyContent="center" margin="0 30px">
<Flex justifyContent="center" margin="0 30px" fontSize={18}>
과거를 회고하며 미래로 나아가는 과정을 촉진하는 의미를 가진 이름으로 &apos; Past&apos; (과거)와 &apos;Forward
&apos;(앞으로 나아가다)를 결합하여 비전을 표현합니다.
</Flex>
Expand Down
4 changes: 2 additions & 2 deletions src/components/layout/parts/PageSideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const PageSideBar: FC<Props> = ({ onClose }) => {
</AccordionButton>
{group &&
group.nodes.map(id => (
<AccordionPanel pb={4}>
<AccordionPanel pb={4} overflow="auto">
<a
id="leftside_persnalproject"
href={`group-boards?id=${id.id}`}
Expand Down Expand Up @@ -186,7 +186,7 @@ const PageSideBar: FC<Props> = ({ onClose }) => {

<AccordionPanel pb={4}>
<Accordion allowMultiple>
<AccordionItem>
<AccordionItem overflow="auto">
{retro &&
retro.nodes
.filter(item => item.teamId)
Expand Down
7 changes: 2 additions & 5 deletions src/components/notice/NoticeBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ import * as S from '@/styles/notice/noticeBoard.style';
// 발행한 게시물 조회
export const usePublishedNotice = () => {
const [PublishedNoticeList, setPublishedNoticeList] = useState<GetNoticeListPosts[]>([]);
const toast = useCustomToast();

// 게시글 목록 조회 api
const fetchNotice = async () => {
try {
const data = await NoticeServices.listGet({ page: 1, size: 10 });
setPublishedNoticeList(data.data.posts.filter(post => post.status === 'PUBLISHED'));
} catch (error) {
toast.error(error);
console.error(error);
}
};

Expand Down Expand Up @@ -68,7 +67,6 @@ export const NoticeBoard = () => {
// }
// };

const toast = useCustomToast();
const navigate = useNavigate();
const [user, setUser] = useState<UserData>();
const publishedList = usePublishedNotice();
Expand All @@ -79,9 +77,8 @@ export const NoticeBoard = () => {
try {
const data = await UserServices.get();
setUser(data.data);
console.log(data.data);
} catch (error) {
toast.error(error);
console.error(error);
}
};

Expand Down
5 changes: 2 additions & 3 deletions src/components/notice/NoticeShowHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ export const NoticeShowHeader = ({ id, title, date, views }: NoticeShowHeaderPro
try {
const data = await UserServices.get();
setUser(data.data);
console.log(data.data);
} catch (error) {
toast.error(error);
console.error(error);
}
};

Expand All @@ -52,7 +51,7 @@ export const NoticeShowHeader = ({ id, title, date, views }: NoticeShowHeaderPro
toast.info('게시글이 삭제되었습니다.');
}, 1000); // 1초(1000밀리초) 후에 함수를 실행
} catch (e) {
toast.error(e);
console.error(e);
}
};

Expand Down
4 changes: 1 addition & 3 deletions src/components/projectRetro/GroupBoardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import postImageToS3 from '@/api/imageApi/postImageToS3';
import { UserServices } from '@/api/services/User';
import Thumbnail from '@/assets/Thumbnail.png';
import ReviseModal from '@/components/RetroList/Modal';
import { useCustomToast } from '@/hooks/useCustomToast';
import * as T from '@/styles/RetroList/ContentsList.styles';
import * as S from '@/styles/projectRetro/GroupBoardList.styles';

Expand All @@ -37,7 +36,6 @@ export const convertToLocalTime = (dateString: string | number | Date) => {

const GroupBoardList: React.FC<GroupBoardListProps> = ({ data }) => {
const navigate = useNavigate();
const toast = useCustomToast();
const [user, setUser] = useState<UserData>();
const [image, setImage] = useState<{ [key: number]: string }>({});
const [openReviseModalId, setOpenReviseModalId] = useState<number | null>(null);
Expand All @@ -59,7 +57,7 @@ const GroupBoardList: React.FC<GroupBoardListProps> = ({ data }) => {
const data = await UserServices.get();
setUser(data.data);
} catch (error) {
toast.error(error);
console.error(error);
}
};
useEffect(() => {
Expand Down
4 changes: 1 addition & 3 deletions src/components/projectRetro/GroupList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import postImageToS3 from '@/api/imageApi/postImageToS3';
import { UserServices } from '@/api/services/User';
import Thumbnail from '@/assets/Thumbnail.png';
import Modal from '@/components/projectRetro/Modal';
import { useCustomToast } from '@/hooks/useCustomToast';
import * as S from '@/styles/projectRetro/GroupList.styles';

interface GroupListProps {
Expand All @@ -30,7 +29,6 @@ interface GroupData {
const GroupList: React.FC<GroupListProps> = ({ groups }) => {
const data = groups.nodes;
const navigate = useNavigate();
const toast = useCustomToast();
const [isEditModalOpen, setIsEditModalOpen] = useState<boolean>(false);
const [isCreateModalOpen, setIsCreateModalOpen] = useState<boolean>(false);
const [image, setImage] = useState<{ [key: number]: string }>({});
Expand Down Expand Up @@ -71,7 +69,7 @@ const GroupList: React.FC<GroupListProps> = ({ groups }) => {
const data = await UserServices.get();
setUser(data.data);
} catch (error) {
toast.error(error);
console.error(error);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/projectRetro/ManageModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const ManageModal: React.FC<ManageModalProps> = ({ groupId, data, isClose }) =>
const data = await UserServices.get();
setUser(data.data);
} catch (error) {
toast.error(error);
console.error(error);
}
};

Expand Down

0 comments on commit 2a51b89

Please sign in to comment.