Skip to content

Commit

Permalink
Merge pull request #81 from Teammanagers/develop
Browse files Browse the repository at this point in the history
이슈 수정
  • Loading branch information
Low-ProFiles authored Aug 23, 2024
2 parents 4e8ca35 + 1e0a147 commit 08b785d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
14 changes: 8 additions & 6 deletions src/components/team/TeamContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ const TeamContainer: React.FC<LayoutProps> = ({ children }) => {
queryFn: getTeamById
});

const teamTextByPath = {
'/team/create': '프로젝트를 위해 팀을 생성해 주세요',
'/team/join': '팀 참가를 위해 코드를 입력해 주세요',
'/team/share': '팀원의 참가를 위해 팀 코드를 공유해 주세요',
'/team': `${team && team.result.name}님이 현재 진행하고 있는 팀 프로젝트에요!`
}[location.pathname];
const teamTextByPath =
team &&
{
'/team/create': '프로젝트를 위해 팀을 생성해 주세요',
'/team/join': '팀 참가를 위해 코드를 입력해 주세요',
'/team/share': '팀원의 참가를 위해 팀 코드를 공유해 주세요',
'/team': `${team.result.name}님이 현재 진행하고 있는 팀 프로젝트에요!`
}[location.pathname];

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/team/useEmptyTeamIdRedirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const useEmptyTeamIdRedirect = (redirectPath: string = '/login') => {

useEffect(() => {
if (!teamId || !teamCode) {
navigate(redirectPath);
// navigate(redirectPath);
}
}, [teamId, teamCode, navigate, redirectPath]);

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useRequireAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const RequireAuth = ({ children }) => {
useEffect(() => {
const accessToken = localStorage.getItem('accessToken');
if (!accessToken && location.pathname !== '/login') {
navigate('/login');
// navigate('/login');
}
}, [children]);

Expand Down
2 changes: 1 addition & 1 deletion src/pages/team/team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const TeamPage = () => {
return <SearchTeamSection data={item} />;
})}
<SelectTeamComponent>
{!isLoading && team.result.teamList < 5 && (
{!isLoading && team.result.teamList.length < 5 && (
<>
<TeamLogoComponent onClick={handleClickCreateButton}>
<CreateTeam />
Expand Down

0 comments on commit 08b785d

Please sign in to comment.