-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/kSideProject/kpring into fea…
…t/update-profile
- Loading branch information
Showing
34 changed files
with
313 additions
and
926 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 |
---|---|---|
|
@@ -38,3 +38,6 @@ out/ | |
|
||
### Kotlin ### | ||
.kotlin | ||
|
||
### api docs ### | ||
/src/main/resources/static/openapi3.yaml |
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 |
---|---|---|
|
@@ -38,3 +38,6 @@ out/ | |
|
||
### Kotlin ### | ||
.kotlin | ||
|
||
### api docs ### | ||
/src/main/resources/static/openapi3.yaml |
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 |
---|---|---|
|
@@ -21,3 +21,4 @@ | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
Chart.lock |
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 |
---|---|---|
@@ -1,33 +1,32 @@ | ||
import { List } from "@mui/material"; | ||
import MemberListItem from "./MemberListItem"; | ||
import MemberProfile from "../Profile/MemberProfile"; | ||
import React from "react"; | ||
import { Member } from "../../types/layout"; | ||
import ModalComponent from "../Modal/ModalComponent"; | ||
import Profile from "../Profile/Profile"; | ||
import useModal from "../../hooks/Modal"; | ||
|
||
interface MemberListProps{ | ||
memberList: Member[] | ||
interface MemberListProps { | ||
memberList: Member[]; | ||
} | ||
|
||
// TODO : 오른쪽 사이드바 멤버 리스트 | ||
const MemberList : React.FC<MemberListProps> = ({memberList}) => { | ||
const [openProfile, setOpenProfile] = React.useState(false); | ||
const handleProfileOpen = () => setOpenProfile(true); | ||
const handleProfileClose = () => setOpenProfile(false); | ||
const MemberList: React.FC<MemberListProps> = ({ memberList }) => { | ||
const { isOpen, openModal, closeModal } = useModal(); | ||
|
||
return ( | ||
return ( | ||
<> | ||
<List className="overflow-auto scrollbar-hide"> | ||
{memberList.map(member=>( | ||
<MemberListItem member={member} handleProfileOpen = {handleProfileOpen}/> | ||
))} | ||
</List> | ||
<MemberProfile | ||
openModal={openProfile} | ||
closeModal={handleProfileClose} | ||
></MemberProfile> | ||
<List className="overflow-auto scrollbar-hide"> | ||
{memberList.map((member) => ( | ||
<MemberListItem member={member} handleProfileOpen={openModal} /> | ||
))} | ||
</List> | ||
<ModalComponent isOpen={isOpen}> | ||
{/* TODO: API연결되면 props로 유저정보 내려주기 */} | ||
<Profile closeModal={closeModal} /> | ||
</ModalComponent> | ||
</> | ||
); | ||
}; | ||
|
||
) | ||
} | ||
|
||
export default MemberList | ||
export default MemberList; |
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,21 @@ | ||
import { Box, Modal } from "@mui/material"; | ||
import React, { ReactNode } from "react"; | ||
import { modalStyle } from "../../types/modal"; | ||
|
||
interface ModalComponentProps { | ||
children: ReactNode; | ||
isOpen: boolean; | ||
} | ||
|
||
const ModalComponent = ({ children, isOpen }: ModalComponentProps) => { | ||
return ( | ||
<Modal | ||
open={isOpen} | ||
aria-labelledby="parent-modal-title" | ||
aria-describedby="parent-modal-description"> | ||
<Box sx={modalStyle}>{children}</Box> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default ModalComponent; |
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
import { Avatar, Button, Typography } from "@mui/material"; | ||
|
||
interface ProfileProps { | ||
closeModal: () => void; | ||
} | ||
|
||
const Profile = ({ closeModal }: ProfileProps) => { | ||
return ( | ||
<> | ||
<Avatar></Avatar> | ||
<Typography id="keep-mounted-madal-title">User Name</Typography> | ||
<Button onClick={closeModal}>닫기</Button> | ||
</> | ||
); | ||
}; | ||
|
||
export default Profile; |
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,42 @@ | ||
import { Button, FormControl, Input, Select } from "@mui/material"; | ||
|
||
import React from "react"; | ||
import useModal from "../../hooks/Modal"; | ||
import { Label } from "@mui/icons-material"; | ||
import axios from "axios"; | ||
|
||
const CreateServerForm = () => { | ||
const { closeModal, openModal } = useModal(); | ||
|
||
const onSubmitHandler = async () => {}; | ||
|
||
return ( | ||
<div> | ||
<h2>새로운 서버 생성</h2> | ||
<form onSubmit={onSubmitHandler}> | ||
<label>서버이름</label> | ||
<Input type="text" required /> | ||
|
||
{/* <FormControl defaultValue="" required> | ||
<Label>서버이름</Label> | ||
<Input /> | ||
</FormControl> | ||
<FormControl defaultValue=""> | ||
<Label>카테고리</Label> | ||
<Select | ||
defaultValue={"personal"} | ||
id="named-select" | ||
name="demo-select"> | ||
<option value="personal">개인</option> | ||
<option value="game">게임</option> | ||
<option value="study">학습</option> | ||
</Select> | ||
</FormControl> */} | ||
<button type="submit">서버생성</button> | ||
</form> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CreateServerForm; |
Oops, something went wrong.