-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAUTRE] 공홈 어드민 소개 탭 hook form 연결 (#139)
* install: mds ui 버전업 * feat: curriculum hook form 연결 * feat: ExecInfo 컴포넌트 분리 및 hook form 연결 * feat: HeaderBanner 및 CoreValue hook form 연결 * fix: mds 변경으로 인한 빌드에러 픽스 * fix: 코드리뷰 반영 * fix: ExecType 선언 * install: mds ui 업데이트 * install: mds textarea patch update * feat: 지원하기 탭 hook form 연결 * delete: conflict
- Loading branch information
Showing
13 changed files
with
215 additions
and
869 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
src/components/org/OrgAdmin/AboutSection/Executives/ExecInfo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import { useFormContext } from 'react-hook-form'; | ||
|
||
import MyDropzone from '../../MyDropzone'; | ||
import IcBehanceLogo from '../assets/IcBehanceLogo'; | ||
import IcGithubLogo from '../assets/IcGithubLogo'; | ||
import IcLinkedinLogo from '../assets/IcLinkedinLogo'; | ||
import IcMailLogo from '../assets/IcMailLogo'; | ||
import { StDescription, StInput, StInputLabel } from '../style'; | ||
import SNSInput from './SNSInput'; | ||
import { StPhotoWrapper, StSNSWrapper } from './style'; | ||
|
||
interface ExecInfoProps { | ||
selectedExec: string; | ||
} | ||
|
||
const ExecInfo = ({ selectedExec }: ExecInfoProps) => { | ||
const method = useFormContext(); | ||
const { register } = method; | ||
|
||
return ( | ||
<> | ||
<StPhotoWrapper> | ||
<StInputLabel>프로필 사진</StInputLabel> | ||
<StDescription>사진은 1:1 비율로 올려주세요.</StDescription> | ||
<MyDropzone | ||
method={method} | ||
label={`${selectedExec}.profileImageFileName`} | ||
width="168px" | ||
height="168px" | ||
shape="circle" | ||
/> | ||
</StPhotoWrapper> | ||
<StInput | ||
{...register(`${selectedExec}.name`)} | ||
labelText="이름" | ||
placeholder="ex. 김솝트" | ||
/> | ||
<StInput | ||
{...register(`${selectedExec}.affiliation`)} | ||
labelText="소속" | ||
placeholder="ex. 솝트대학교 / 솝트컴퍼니 / 앱잼 프로덕트명" | ||
/> | ||
<StInput | ||
{...register(`${selectedExec}.introduction`)} | ||
labelText="한 줄 소개" | ||
placeholder="ex. 새로운 도전을 위해 과감히 용기내는 사람" | ||
/> | ||
<StSNSWrapper> | ||
<span>SNS</span> | ||
<SNSInput | ||
label={`${selectedExec}.sns.email`} | ||
icon={IcMailLogo} | ||
placeholder="ex. 000@sopt.org" | ||
/> | ||
<SNSInput | ||
label={`${selectedExec}.sns.linkedin`} | ||
icon={IcLinkedinLogo} | ||
placeholder="ex. https://www.linkedin.com/..." | ||
/> | ||
<SNSInput | ||
label={`${selectedExec}.sns.github`} | ||
icon={IcGithubLogo} | ||
placeholder="ex. https://github.com/..." | ||
/> | ||
<SNSInput | ||
label={`${selectedExec}.sns.behance`} | ||
icon={IcBehanceLogo} | ||
placeholder="ex. https://www.behance.net/..." | ||
/> | ||
</StSNSWrapper> | ||
</> | ||
); | ||
}; | ||
|
||
export default ExecInfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.