Skip to content

Commit

Permalink
chore : 수정 상태의 달력 삭제 & 라벨 추가 (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmlim0070 authored Nov 7, 2024
1 parent d69cff6 commit 98d029d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/entities/label/ui/EditLabe.styled.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import styled from 'styled-components';

export const Container = styled.div`
display: flex;
pointer-events: none;
`;
12 changes: 12 additions & 0 deletions src/entities/label/ui/EditLabel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Button from '@/shared/ui/Button/Button';
import { Container } from './EditLabe.styled';

export const EditLabel = () => {
return (
<Container>
<Button fontSize="14px" height="35px" width="70px" hasBorder>
수정 중
</Button>
</Container>
);
};
5 changes: 4 additions & 1 deletion src/widgets/write-diary/ui/WriteDiaryContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { DatePicker } from '@/widgets/date-picker';
import { DiaryVisibilityControls } from '@/widgets/diary-visibility-controls';
import { setDateFormat } from '@/widgets/date-picker/ui/setDateFormat';
import { useNavigate, useParams } from 'react-router-dom';
import { EditLabel } from '@/entities/label/ui/EditLabel';

export const WriteDiaryContainer: React.FC<WriteDiaryContainerProps> = ({
initialDate = new Date(), // 초기 날짜가 없으면 오늘 날짜 사용
Expand Down Expand Up @@ -117,7 +118,9 @@ export const WriteDiaryContainer: React.FC<WriteDiaryContainerProps> = ({
: formatDateWithDot(date)}
</DateContainer>
<DatePickeContainer>
{isEditing ? null : (
{listType === 'edit' ? (
<EditLabel />
) : (
<DatePicker
initialDate={selectedDate}
onSelectDate={handleDateSelect}
Expand Down

0 comments on commit 98d029d

Please sign in to comment.