Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Button/LinkButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface Props {
children: React.ReactNode;
route: string;
disabled?: boolean;
theme?: 'normal' | 'light' | 'gray';
theme?: 'normal' | 'light' | 'gray' | 'ghost';
extraClass?: string;
isReplace?: boolean;
}
Expand Down
7 changes: 7 additions & 0 deletions src/features/Profile/components/Feed/NoProfileFeed.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import Image from 'next/image';
import { IMAGES } from '@/constants/images';
import Button from '@/components/Button/Button';
import { useCustomRouter } from '@/hooks/useCustomRouter';
import { PAGES } from '@/constants/page';

function NoProfileFeed() {
const { navigate } = useCustomRouter('profile');
return (
<div className='mt-3 flex w-full flex-col items-center justify-center gap-[15px]'>
<Image
Expand All @@ -16,6 +20,9 @@ function NoProfileFeed() {
리뷰를 작성하면 여기에 표시됩니다.
</p>
</div>
<Button theme='normal' onClick={() => navigate(PAGES.SEARCH)}>
책 추가하기
</Button>
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/features/Profile/components/Profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Profile({ userId, isRootUser = false, profileDetail }: Props) {
<UserType profileDetail={profileDetail} />
{isRootUser && (
<div className='flex px-page'>
<LinkButton route={getPath.profileEdit(userId)} theme='normal'>
<LinkButton route={getPath.profileEdit(userId)} theme='ghost'>
프로필 편집
</LinkButton>
</div>
Expand Down
20 changes: 11 additions & 9 deletions src/features/Profile/components/Profile/ProfilePageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ function ProfilePageHeader({ isRootUser, userId }: Props) {
return (
<WellEntryHeader title='프로필' hasBackButton={!isRootUser}>
{isRootUser && (
<CustomMotionLink
id='setting-button'
type='button'
whileTap={{ scale: 0.9 }}
href={getPath.profileSetting(userId)}
className='absolute right-[28px] top-[35px] z-70'
>
<SettingIcon />
</CustomMotionLink>
<div className='safe-header absolute left-[50%] z-70 flex w-[450px] translate-x-[-50%] gap-[20px] pt-[70px] mobile:left-0 mobile:w-full mobile:translate-x-0'>
<CustomMotionLink
id='setting-button'
type='button'
whileTap={{ scale: 0.9 }}
href={getPath.profileSetting(userId)}
className='absolute right-[28px] top-[28px] z-70'
>
<SettingIcon />
</CustomMotionLink>
</div>
)}
</WellEntryHeader>
);
Expand Down
3 changes: 3 additions & 0 deletions src/styles/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
.button-error {
@apply button-common bg-error text-white;
}
.button-ghost {
@apply button-common border border-main bg-white text-main;
}
.add-button-wrapper {
@apply w-full px-page pb-[24px];
}
Expand Down
2 changes: 2 additions & 0 deletions src/utils/getButtonColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export const getButtonColor = (theme: string) => {
return 'button-gray';
case 'light':
return 'button-light';
case 'ghost':
return 'button-ghost';
default:
return `button-common ${theme}`;
}
Expand Down