Skip to content

Commit

Permalink
Merge pull request #862 from woowacourse-teams/dev/fe
Browse files Browse the repository at this point in the history
[FE] 크롬 익스텐션 서브모듈 추가 및 모바일 헤더 버그 수정
  • Loading branch information
Hain-tain authored Oct 23, 2024
2 parents 3706cbd + ac5c6e1 commit 336c051
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "google-chrome-extension"]
path = google-chrome-extension
url = https://github.com/Jaymyong66/codezap-chrome-extension.git

[submodule "backend/submodules/private"]
path = backend/submodules/private
url = https://github.com/codezap2024/2024-code-zap-private.git
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Header = ({ headerRef }: { headerRef: React.RefObject<HTMLDivElement> }) =
if (isMenuOpen) {
toggleMenu();
}
}, [location.pathname, isMenuOpen]);
}, [location.pathname]);

if (isChecking) {
return (
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/hooks/category/useCategory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ interface Props {
}

export const useCategory = ({ memberId, initCategory }: Props) => {
const { data } = useCategoryListQuery({ memberId });
const { data, isFetching } = useCategoryListQuery({ memberId });
const options = data?.categories || [];

if (!initCategory) {
initCategory = { id: options[0]?.id, name: '카테고리' };
initCategory = { id: options[0]?.id, name: '카테고리 없음' };
}

const { isOpen, toggleDropdown, currentValue, handleCurrentValue, dropdownRef } = useDropdown<Category>(initCategory);
Expand Down Expand Up @@ -47,5 +47,6 @@ export const useCategory = ({ memberId, initCategory }: Props) => {
createNewCategory,
dropdownRef,
isPending,
isCategoryQueryFetching: isFetching,
};
};
6 changes: 6 additions & 0 deletions frontend/src/pages/TemplateUploadPage/TemplateUploadPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ const TemplateUploadPage = () => {
};

const handleSaveButtonClick = async () => {
if (categoryProps.isCategoryQueryFetching) {
failAlert('카테고리 목록을 불러오는 중입니다. 잠시 후 다시 시도해주세요.');

return;
}

const errorMessage = validateTemplate();

if (errorMessage) {
Expand Down
1 change: 1 addition & 0 deletions google-chrome-extension

0 comments on commit 336c051

Please sign in to comment.