Skip to content

Commit

Permalink
Merge pull request #349 from boostcampwm2023/develop
Browse files Browse the repository at this point in the history
12/14 배포
  • Loading branch information
MinboyKim authored Dec 13, 2023
2 parents bd95531 + 1921cde commit fb52aa1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="./src/assets/favicon.png" />
<link rel="icon" href="./src/assets/logos/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>별 하나에 글 하나 🌟</title>
<script
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function Instances({ count, size, color, isCustom }: PropsType) {
const arms = count * STARS_DENSITY;
const center = count - arms;

let [spiralPositions, spherePositions] = useMemo(() => {
const [spiralPositions, spherePositions] = useMemo(() => {
const spirals = [];
const spheres = [];
for (let i = 0; i < arms; i++) {
Expand Down
11 changes: 9 additions & 2 deletions packages/client/src/widgets/writingModal/ui/WritingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Caption } from 'shared/styles';
import { AlertDialog, Button, Input, Modal, TextArea } from 'shared/ui';
import Images from './Images';

type TextStateTypes = 'DEFAULT' | 'INVALID';
type TextStateTypes = 'DEFAULT' | 'INVALID' | 'OVER';

export default function WritingModal() {
const [titleState, setTitleState] = useState<TextStateTypes>('DEFAULT');
Expand Down Expand Up @@ -76,13 +76,20 @@ export default function WritingModal() {
placeholder="제목"
value={title}
onChange={(e) => {
if (e.target.value.length > 20) {
setTitleState('OVER');
return;
}
setTitleState('DEFAULT');
setTitle(e.target.value);
}}
state={titleState}
autoComplete="off"
/>
{titleState === 'INVALID' && <Message>제목을 입력해주세요.</Message>}
{titleState === 'OVER' && (
<Message>제목은 20자 까지 입력 가능합니다.</Message>
)}
</TitleContainer>
<ContentContainer state={contentState}>
<TextArea
Expand All @@ -106,7 +113,7 @@ export default function WritingModal() {
}

const TitleContainer = styled.div`
margin-bottom: 16px;
margin-bottom: 20px;
`;

const ContentContainer = styled.div<{ state: TextStateTypes }>`
Expand Down

0 comments on commit fb52aa1

Please sign in to comment.