Skip to content

Commit

Permalink
Merge pull request #48 from School-of-Company/fix/total
Browse files Browse the repository at this point in the history
🔀 데이터 가공
  • Loading branch information
happytaeyoon authored Dec 3, 2024
2 parents dd7f5e3 + 1be2abe commit 6f70f27
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/entities/signIn/ui/SignupPrompt/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const SignupPrompt = () => {
<p className="text-caption2 text-gray-300">
아직 관리자 로그인을 안 하셨나요?
</p>
<Link href="/signup" className="text-caption2 text-gray-500">
<Link href="/signUp" className="text-caption2 text-gray-500">
회원가입
</Link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/entities/signUp/api/signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const signUp = async (
});
if (response.status === 200) {
toast.success('회원가입이 완료되었습니다.');
router.push('/signin');
router.push('/signIn');
}
} catch (error) {
console.error('Signup failed', error);
Expand Down
14 changes: 13 additions & 1 deletion src/shared/ui/Table/TableItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ const TableItem = <T extends { id: number } & Record<string, unknown>>({
};

const isSelected = state === data.id;
type RenderValueType = boolean | string | object | unknown;

const renderValue = (value: RenderValueType): string => {
if (typeof value === 'boolean') {
return value ? 'O' : 'X';
} else if (value === 'PRE') {
return '사전 신청';
} else if (value === 'FIELD') {
return '현장 신청';
}
return typeof value === 'string' ? value : JSON.stringify(value);
};

return (
<button
Expand All @@ -33,7 +45,7 @@ const TableItem = <T extends { id: number } & Record<string, unknown>>({
textOverflow: 'ellipsis',
}}
>
{typeof value === 'string' ? value : JSON.stringify(value)}
{renderValue(value)}
</div>
))}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ const TraineeForm = ({ params }: { params: number }) => {
});

const schoolLevelOptions = [
{ value: 'elementary', label: '초등학교' },
{ value: 'middle', label: '중학교' },
{ value: 'high', label: '고등학교' },
{ value: 'education', label: '교육청' },
{ value: 'other', label: '기타' },
{ value: '초등학교', label: '초등학교' },
{ value: '중학교', label: '중학교' },
{ value: '고등학교', label: '고등학교' },
{ value: '교육청', label: '교육청' },
{ value: '기타', label: '기타' },
];

const yesNoOptions = [
Expand Down

0 comments on commit 6f70f27

Please sign in to comment.