Skip to content

Commit

Permalink
fix minor bugs in FileBox
Browse files Browse the repository at this point in the history
  • Loading branch information
kimheonningg committed Sep 22, 2024
1 parent 9887258 commit dc1e146
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/common/FileBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Files } from '../types/UserTypes';

export interface FileBoxProps {
data: Files;
setData: (r: Files) => void;
setData?: (r: Files) => void;
max: number;
}

Expand All @@ -37,7 +37,7 @@ const SelectView = styled.View`
const FileBox = ({ data, setData, max }: FileBoxProps) => {
const handleFileDelete = (index: number) => {
const newData = data.filter((v, i) => i !== index);
setData(newData);
setData?.(newData);
};

return (
Expand All @@ -46,7 +46,7 @@ const FileBox = ({ data, setData, max }: FileBoxProps) => {
<FilePicker
callback={r => {
console.log(r);
setData([{ name: r.name ? r.name : 'noname', uri: r.uri }]);
setData?.([{ name: r.name ? r.name : 'noname', uri: r.uri }]);
}}
disabled={data.length >= max}
style={styles.BoxView}>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Auth/Reformer/CareerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default function CareerModal({
setValue={v => {
handleContentChange(v, 'status');
}}
placeholder='예시) 재학, 휴학, 졸업, 수료'
placeholder="예시) 재학, 휴학, 졸업, 수료"
/>
</View>
);
Expand All @@ -169,15 +169,15 @@ export default function CareerModal({
setValue={v => {
handleContentChange(v, 'team');
}}
placeholder='예시) 소품디자인팀 인턴'
placeholder="예시) 소품디자인팀 인턴"
/>
<InputView
title="근무기간"
value={form.career[index].period}
setValue={v => {
handleContentChange(v, 'period');
}}
placeholder='예시) 6개월, 3년'
placeholder="예시) 6개월, 3년"
/>
</View>
);
Expand Down Expand Up @@ -220,7 +220,7 @@ export default function CareerModal({
setValue={v => {
handleContentChange(v, 'content');
}}
placeholder='예시) 최우수상'
placeholder="예시) 최우수상"
/>
</View>
);
Expand Down

0 comments on commit dc1e146

Please sign in to comment.