Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

너소서 폼 작성 부분 #87

Merged
merged 13 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
✨feat: 기획 제대로 이해 못한 부분 수정, 작성 첫페이지와 연결
  • Loading branch information
SeojinSeojin committed Jan 16, 2022
commit b036fbc24aaf9dd76cbd6f0e7f2cb6be11b6cb7e
1 change: 0 additions & 1 deletion src/infrastructure/api/types/neososeo-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export type NeososeoFormData = {
title: string;
content: string;
imageSub: string;
imageMain: string;
relation: string[];
};

Expand Down
2 changes: 0 additions & 2 deletions src/infrastructure/mock/neososeo-form.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@ export const NEOSOSEO_FORM_DATA: { FORM: NeososeoFormData } = {
relation: ['동네친구', '쿵짝최고', '존경해요', '찐친베프'],
imageSub:
'https://ww.namu.la/s/61e3a8075b5aa238383c0d89badd3442f7389a0285575fc5bc5c16d2a34f22c66e57e35d568b63b706fa24750c784d55e972ceeea93fa5a91d00dab1eea37681e189ae826afe668fb379b0cb3a446f3268755691ed20c6a165185d44e2fd1029896062ed4df01a806594e35a637b2372',
imageMain:
'https://ww.namu.la/s/fb6e8a32fae6736a8f9545e34543d9e5f8aaf9b737ba73aa9b9192e4a4e86ea71489f07c93e66055aa8790bbefea8b237268e578cbc323091b38e0c647b2037ec1cc8d56dd4fa84dfd94e2982aca769a8bbe2f8008227f386f55a9ec546b1a63ab412af0c82266c640e636d31c9d280d',
},
};
9 changes: 6 additions & 3 deletions src/presentation/pages/NeososeoForm/Home/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import { neososeoFormState } from '@stores/neososeo-form';
import { useNavigate } from 'react-router-dom';
import { useRecoilValue } from 'recoil';
import { StButton, StNeososeoFormHome, StImage } from './style';
import { StButton, StNeososeoFormHome } from './style';

function NeososeoFormHome() {
const neososeoFormData = useRecoilValue(neososeoFormState);
const navigate = useNavigate();

if (!neososeoFormData) return <></>;
return (
<StNeososeoFormHome>
<div>
<StImage src={neososeoFormData.imageMain} alt={neososeoFormData.content} />
<div>{neososeoFormData.content}</div>
</div>
<StButton>답변 작성하기</StButton>
<StButton onClick={() => navigate('intro')}>답변 작성하기</StButton>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도!! 필수값 빈값이면 disalbed해주기

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

얍얍!! 넣어주겠읍니다~!!!!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넣어주었습니다~!

</StNeososeoFormHome>
);
}
Expand Down
2 changes: 0 additions & 2 deletions src/presentation/pages/NeososeoForm/Home/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ export const StNeososeoFormHome = styled.div`
width: calc(100vw - 40px);
}
`;

export const StImage = styled.img``;
2 changes: 1 addition & 1 deletion src/presentation/routes/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Router = () => {
<Route path="/*" element={<UserRouter />} />
<Route path="/team/*" element={<TeamRouter />} />
<Route path="/neoga/*" element={<NeogaRouter />} />
<Route path="/neoseosoform/:userID/:formID/*" element={<NeososeoFormPage />} />
<Route path="/neososeoform/:userID/:formID/*" element={<NeososeoFormPage />} />
</Routes>
</BrowserRouter>
);
Expand Down