-
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.
Merge pull request #162 from bsideproject/moon
[feat] UserProfile 부분 우선 커밋
- Loading branch information
Showing
7 changed files
with
74 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react'; | ||
import { Textarea } from '@/components/index.tsx'; | ||
import { useForm } from 'react-hook-form'; | ||
|
||
interface ProfileCardProps { | ||
name : string; | ||
age: number; | ||
gender : 'Male' | 'Female'; | ||
imageSrc : string; | ||
} | ||
|
||
export default function ProfileCard({ name, age, gender, imageSrc }: ProfileCardProps) { | ||
const { register } = useForm({ mode: 'onChange' }); | ||
|
||
return ( | ||
<div className="w-full h-auto border border-gray-300 flex flex-col bg-r1 text-g0"> {/* flex-direction 변경 */} | ||
<div className="flex w-full"> | ||
<div className="ml-[20px] w-[52px] h-[72px] flex items-center justify-center mt-[20px]"> | ||
<img src={imageSrc} alt={`${name}'s profile`} /> | ||
</div> | ||
<div className="flex flex-col justify-center pl-5 h-[72px] mt-[17px]"> | ||
<div className="text-lg font-bold">{name}</div> | ||
<div className="text-base">{age} years old | {gender}</div> | ||
</div> | ||
<div className="ml-auto flex items-center pr-4 mb-[132px]"> | ||
<button className="text-sm text-r5 border border-r5 rounded-full w-[50px] h-[24px]">Edit</button> | ||
</div> | ||
</div> | ||
<Textarea | ||
register={ register('describe') } | ||
initValue={"Hi, I'm Dennis. I'm 31 years old and I'm from Seoul, South Korea. I'm a software engineer with 5 years of experience in the industry. I'm passionate about building innovative products that make people's lives easier."} | ||
className="bg-r1 mb-[20px] h-[110px] text-[14px]" | ||
readonly={true} | ||
/> | ||
</div> | ||
); | ||
} |
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
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 |
---|---|---|
@@ -1,26 +1,17 @@ | ||
import React from 'react'; | ||
import { Nav, ProfileCard } from '@/components/index.tsx'; | ||
|
||
export default function UserProfile() { | ||
return ( | ||
<> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<h1>hi~~</h1> | ||
<ProfileCard age={22} name={'James'} gender='Male' imageSrc='https://picsum.photos/700/700/?image=10' /> | ||
<div className="mt-[83px] fixed bottom-[-15px] w-full overflow-x-hidden left-[50%] translate-x-[-50%] px-[20px] max-w-max"> | ||
<div className="w-full"> | ||
<div className="mb-[13px] space-x-[8px] max-w-max"> | ||
<Nav initMenu={3}/> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
}; |
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