Skip to content

Commit

Permalink
토픽생성완료 후 로직 (#176)
Browse files Browse the repository at this point in the history
* fix: lineheight 1.4 기본값 적용

* feat: text, image icon 추가

* fix: padding 값 수정

* fix: 수정된 input theme으로 변경

* feat: 카테고리 input form 추가

* fix: 파일 로직 변경

* feat: 토픽생성 image input 컴포넌트 추가

* fix: textinput props 변경

* feat: 뒤로가기 로직을 위한 코드수정

* feat: B topic step2 추가

* feat: B topic step1 추가

* feat: B topic 페이지 추가

* feat: add delete icon

* feat: add maxlength

* fix: constant fix

* fix: constant fix

* fix: form fix

* feat: add BTopicCreate Step2 page

* feat: separate imageinput component

* feat: add imgurl dto

* feat: add topic deadline constant

* fix: modal close button width, height fix

* feat: 토픽생성 api 구축

* feat: 토픽생성 form 유효성 검사 추가

* chore: update gitignore

* fix: update value by useWatch

* fix: lint error

* fix: 로고색상 변경 #169

* feat: 토픽생성 유효성 검사 및 api 연동

* feat: 토픽생성 api dto 수정

* fix: 슬라이더 , 투표완료 컴포넌트 내 로고위치 수정

* fix: topic content 글자수에 따른 size 조정

* fix: 로그인 화면 로고 B 색상 수정

* fix: 슬라이더 topic content text z index 수정

* fix: api 변경에 따라 topic content 받아오도록 수정

* fix: topiccreate dto interface 위치 조정

* feat: Aside topiccreate api 연동

* fix: 절대경로로 수정

* feat: 토픽생성 완료시 각 사이드 화면으로 이동

---------

Co-authored-by: 전진호 <[email protected]>
  • Loading branch information
chaeyoung103 and Jinho1011 authored Feb 8, 2024
1 parent acf6b07 commit ac72441
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/routes/Topic/Create/ASide/ATopicCreate.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react';
import { FormProvider, useForm } from 'react-hook-form';
import { useNavigate } from 'react-router-dom';

import { useCreateTopics } from '@apis/topic/useTopics';
import DefaultButton from '@components/commons/Button/DefaultButton';
Expand All @@ -18,6 +19,7 @@ import { colors } from '@styles/theme';
import { Container, SubmitButton } from './ATopicCreate.styles';

const ATopicCreate = () => {
const navigate = useNavigate();
const methods = useForm<TopicCreateDTO>({ mode: 'onChange' });

const titleProgress = methods.watch(INPUT_TYPE.TOPIC_TITLE)
Expand Down Expand Up @@ -54,7 +56,7 @@ const ATopicCreate = () => {
},
],
});
console.log('success :', res);
navigate(`/topics/a`);
} catch (error) {
console.error(error);
}
Expand Down
5 changes: 3 additions & 2 deletions src/routes/Topic/Create/BSide/BTopicCreate.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import { FormProvider, SubmitHandler, useForm, useWatch } from 'react-hook-form';
import { useSearchParams } from 'react-router-dom';
import { useNavigate, useSearchParams } from 'react-router-dom';

import { useCreateTopics } from '@apis/topic/useTopics';
import DefaultButton from '@components/commons/Button/DefaultButton';
Expand All @@ -20,6 +20,7 @@ import BTopicCreateStep1 from './BTopicCreateStep1';
import BTopicCreateStep2 from './BTopicCreateStep2';

const BTopicCreate = () => {
const navigate = useNavigate();
const methods = useForm<TopicCreateDTO>({ mode: 'onChange' });
const contentType = useWatch({
control: methods.control,
Expand Down Expand Up @@ -67,7 +68,7 @@ const BTopicCreate = () => {
},
],
});
console.log('success :', res);
navigate(`/topics/b`);
} catch (error) {
console.error(error);
}
Expand Down

0 comments on commit ac72441

Please sign in to comment.