Skip to content

Commit

Permalink
FE-43๐Ÿ’„ MoreOptionMenu ์Šคํƒ€์ผ ์ˆ˜์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
jisurk committed Jul 14, 2024
1 parent 8cde498 commit 4fa679c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/apis/user.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { GetUserResponseType, GetUserRequestType, PatchMeRequestType } from '@/schema/user';
import httpClient from '.';
import TOKEN from '@/lib/constants';
import httpClient from '.';

export const getMe = async (): Promise<GetUserResponseType> => {
const response = await httpClient.get('/users/me', {
Expand Down
25 changes: 14 additions & 11 deletions src/components/epigram/MoreOptionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigge

function MoreOptionsMenu() {
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<button type='button'>
<Image src='/meatballIcon.svg' alt='๋” ๋ณด๊ธฐ ์•„์ด์ฝ˜' width={36} height={36} />
</button>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>์ˆ˜์ •</DropdownMenuItem>
<DropdownMenuItem>์‚ญ์ œ</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
<div className='relative'>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<button type='button'>
<Image src='/meatballIcon.svg' alt='๋” ๋ณด๊ธฐ ์•„์ด์ฝ˜' width={36} height={36} />
</button>
</DropdownMenuTrigger>
{/* NOTE: width๋ฅผ ์กฐ์ •ํ• ๋ ค๋ฉด Dropdown์ปดํฌ๋„ŒํŠธ์—์„œ min-w ์ˆ˜์ • ํ•„์š” */}
<DropdownMenuContent className='absolute top-[-36px] left-5 z-10 bg-white'>
<DropdownMenuItem className='hover:text-illust-blue cursor-pointer text-center'>์ˆ˜์ •</DropdownMenuItem>
<DropdownMenuItem className='hover:text-illust-blue cursor-pointer text-center'>์‚ญ์ œ</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</div>
);
}

Expand Down
14 changes: 8 additions & 6 deletions src/pageLayout/Epigram/EpigramFigure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ function EpigramFigure({ epigram, currentUserId }: EpigramFigureProps) {
return (
<div className='bg-[length:100%_2.5em] bg-[linear-gradient(#eee_.1em,transparent_.1em)] w-full flex justify-center py-6'>
<figure className='w-80 md:w-96 lg:w-[640px] flex flex-col lg: gap-8'>
<div className='flex gap-2'>
{epigram.tags.map((tag) => (
<p key={tag.id} className='text-gray-400 text-base lg:text-xl font-normal'>
#{tag.name}
</p>
))}
<div className='flex justify-between'>
<div className='flex gap-2'>
{epigram.tags.map((tag) => (
<p key={tag.id} className='text-gray-400 text-base lg:text-xl font-normal'>
#{tag.name}
</p>
))}
</div>
{isAuthor && <MoreOptionsMenu />}
</div>
<blockquote className=''>
Expand Down

0 comments on commit 4fa679c

Please sign in to comment.