-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into refac/ReactQuery
- Loading branch information
Showing
19 changed files
with
496 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,56 @@ | ||
# Odugi project | ||
# Odugi 🎧 | ||
|
||
|
||
|
||
|
||
|
||
<img src="https://user-images.githubusercontent.com/75191916/223446704-36bfed67-fa5e-4717-8ff6-6be96bcbb01a.png" width="315" height="315"/> | ||
|
||
- <b>Odugi</b> 는 디스코드의 디자인과 주요 기능들을 클론하여 만든 프로젝트 입니다. | ||
|
||
|
||
<br> | ||
<br> | ||
|
||
|
||
| 팀원 | 역할 | | ||
| --------------------------------------- | --------- | | ||
| [김현우](https://github.com/krokerdile) | FRONT-END | | ||
| [허다은](https://github.com/nno3onn) | FRONT-END | | ||
| [백종인](https://github.com/whipbaek) | BACK-END | | ||
|
||
|
||
# Architecture | ||
|
||
|
||
개발은 MSA 구조를 기반으로 진행되었으며 Spring Cloud와 Eureka를 활용하여 진행하였습니다. | ||
|
||
### Server List | ||
|
||
<br><br> | ||
|
||
# 기술 스택 | ||
|
||
#### FRONT END 🔮 | ||
|
||
- TypeScript | ||
- React | ||
- Zustand | ||
- React Query | ||
- Story Book | ||
|
||
#### BACK END & Devops ♟️ | ||
|
||
- JAVA | ||
- Spring FrameWork (JPA, Security, Cloud ..) | ||
- MySQL | ||
- Redis | ||
- STOMP, WebSocket | ||
- RabbitMQ | ||
- AWS | ||
- AWS S3 | ||
- Jenkins | ||
|
||
<bR> | ||
|
||
# 기능 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import styled from "styled-components"; | ||
import useInput from "@hooks/common/useInput"; | ||
import DefaultInput from "@components/atoms/Input/DefaultInput"; | ||
import { useMutation } from "@tanstack/react-query"; | ||
import { useNavigate, useParams } from "react-router-dom"; | ||
import { useUserStore } from "@store/useUserStore"; | ||
import { useState } from "react"; | ||
import communityApi from "@api/community"; | ||
import CreateCommunityText from "@components/molecules/Text/CreateCommunityText"; | ||
import BackgroundModal from "@components/organisms/BackgroundModal"; | ||
import ImageUploadButton from "@components/molecules/Button/ImageUploadButton"; | ||
import DefaultButton from "@components/atoms/Button/DefaultButton"; | ||
import CancelIcon from "@components/atoms/Icons/CancelIcon"; | ||
import useModalStore from "@store/useModalStore"; | ||
import Text from "@components/atoms/Text/Text"; | ||
import useCreateCategory from "@hooks/query/useCreateCatergory"; | ||
|
||
const CreateCategroyModal = () => { | ||
const navigate = useNavigate(); | ||
|
||
const { userInfo } = useUserStore(); | ||
const { setShowModal } = useModalStore(); | ||
const [name, changeName] = useInput(); | ||
const [type, setType] = useState(); | ||
const [role, setRole] = useState<number>(0); | ||
//userInfo에 role이 없었던가? | ||
const [categoryId, setCategoryId] = useState(); | ||
const { communityId } = useParams(); | ||
const { mutate: createCategory } = useCreateCategory(); | ||
|
||
const MakeCategory = () => { | ||
createCategory({ name, communityId, role }); | ||
closeModal(); | ||
}; | ||
|
||
const closeModal = () => { | ||
setShowModal(false); | ||
}; | ||
|
||
return ( | ||
<BackgroundModal width={440} p={0}> | ||
<> | ||
<CreateCommunityHeader> | ||
<CancelIconWrapper onClick={closeModal}> | ||
<CancelIcon /> | ||
</CancelIconWrapper> | ||
|
||
<Text text="카테고리 만들기" fontSize="xxl" color="white" /> | ||
</CreateCommunityHeader> | ||
<CreateCommunityBody> | ||
<Text text="카테고리 이름" fontSize="xs" color="white" mb={8} /> | ||
<DefaultInput value={name} onChange={changeName} type="text" /> | ||
</CreateCommunityBody> | ||
<CreateCommunityFooter> | ||
<DefaultButton | ||
width={96} | ||
height={38} | ||
text="취소" | ||
backgroundColor="transparernt" | ||
hoverBackgroundColor="transparent" | ||
onClick={closeModal} | ||
/> | ||
<DefaultButton | ||
width={96} | ||
height={38} | ||
text="만들기" | ||
onClick={MakeCategory} | ||
/> | ||
</CreateCommunityFooter> | ||
</> | ||
</BackgroundModal> | ||
); | ||
}; | ||
|
||
const CreateCommunityHeader = styled.div` | ||
padding: 1.5rem 1.5rem 0; | ||
`; | ||
|
||
const CancelIconWrapper = styled.div` | ||
width: 100%; | ||
color: ${({ theme }) => theme.color.icon}; | ||
display: flex; | ||
justify-content: end; | ||
cursor: pointer; | ||
`; | ||
|
||
const CreateCommunityBody = styled.div` | ||
margin: 1rem 0; | ||
padding: 0 0.5rem 0 1rem; | ||
`; | ||
|
||
const CreateCommunityFooter = styled.div` | ||
padding: 16px; | ||
background-color: ${({ theme }) => theme.backgroundColor["grey-7"]}; | ||
display: flex; | ||
justify-content: space-between; | ||
`; | ||
|
||
export default CreateCategroyModal; |
Oops, something went wrong.