Skip to content

Commit

Permalink
Merge pull request #127 from KUIT-Space/feat#99-chat-file
Browse files Browse the repository at this point in the history
Feat: ๊ฐœ๋ฐœ ์ค‘์ธ ๊ณณ ์•ˆ๋‚ด modal ์ถ”๊ฐ€
  • Loading branch information
Turtle-Hwan authored Aug 20, 2024
2 parents efb6030 + ca33f8b commit 7334295
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 24 deletions.
6 changes: 3 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ import { theme } from "@/styles/Theme";

import BoardDetailPage from "./pages/BoardPage/BoardDetailpage/BoardDetailPage";
import BoardRegisterPage from "./pages/BoardPage/BoardRegisterPage/BoardRegisterPage";
import HomePageMemberPage from "./pages/HomePage/HomePageMember";
import HomePageProfile from "./pages/HomePage/HomePageProfile";
import KakaoRedirection from "./pages/LoginPage/KakaoRedirection";
import LoginModal from "./pages/LoginPage/LoginModal";
import InviteSpace from "./pages/SpacePage/InviteSpace";
import HomePageMemberPage from "./pages/HomePage/HomePageMember";
import HomePageProfile from "./pages/HomePage/HomePageProfile";
import SpecialVoiceRoom from "./pages/VoiceRoomPage/SpecialVoiceRoom";
import InviteSpace2 from "./pages/SpacePage/InviteSpace2";
import SpecialVoiceRoom from "./pages/VoiceRoomPage/SpecialVoiceRoom";

// will we need constant path in later..?
// const PATH = {
Expand Down
19 changes: 15 additions & 4 deletions src/pages/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,22 @@ const HomePage = () => {
>
<img src={logoSpace} alt="๋กœ๊ณ " />
</button>
<span>{homeData?.spaceName}</span>
<sty.SettingButtonsWrapper>
<button>
<button
onClick={() => {
//TODO: ์ž„์‹œ๋กœ ์ŠคํŽ˜์ด์Šค ์„ ํƒ์œผ๋กœ ๊ณ 
navigate("/space");
}}
>
<img src={alarm} alt="์•Œ๋ฆผ" />
</button>
<button>
<button
onClick={() => {
//TODO: ์ž„์‹œ๋กœ ์ŠคํŽ˜์ด์Šค ์„ ํƒ์œผ๋กœ ๊ณ 
navigate("/space");
}}
>
<img src={setting} alt="์„ค์ •" />
</button>
</sty.SettingButtonsWrapper>
Expand All @@ -125,9 +136,9 @@ const HomePage = () => {
</div>
</sty.MainBanner>

<BottomBtn style={{ position: "relative" }}>
{/* <BottomBtn style={{ position: "relative" }}>
<Link to="/login">๋กœ๊ทธ์ธ</Link>
</BottomBtn>
</BottomBtn> */}

<sty.NoticeContainer>
<sty.Settlement>
Expand Down
21 changes: 11 additions & 10 deletions src/pages/SpacePage/AccountManage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import TopBarText, { LeftEnum } from "@/components/TopBarText";
import { useState } from "react";
import { useNavigate } from "react-router-dom";
import styled from "styled-components";

import right_arrow from "@/assets/Space/icon_right_arrow.svg";
import { To, useNavigate } from "react-router-dom";
import TopBarText, { LeftEnum } from "@/components/TopBarText";
import NotDevelopModal from "@/utils/NotDevelopModal";

const Name = styled.div`
display: flex;
Expand All @@ -26,28 +29,26 @@ const Password = styled.div`

const AccountManage = () => {
const navigate = useNavigate();

const handleNavigate = (path: To) => {
navigate(path);
};
const [isOpen, setIsOpen] = useState(false);

return (
<div>
<TopBarText left={LeftEnum.Back} center="๊ณ„์ • ์ •๋ณด" right="" />
<div style={{ margin: "0rem 1.25rem 0rem 1.25rem" }}>
<Name onClick={() => handleNavigate("/")}>
<div style={{ margin: "0rem 1.25rem 0rem 1.25rem", cursor: "pointer" }}>
<Name onClick={() => setIsOpen(true)}>
์ด๋ฆ„ ๋ณ€๊ฒฝ
<img style={{ display: "absolute", right: "0" }} src={right_arrow} alt="right_arrow" />
</Name>
<Id onClick={() => handleNavigate("/")}>
<Id onClick={() => setIsOpen(true)}>
์•„์ด๋”” ๋ณ€๊ฒฝ
<img style={{ display: "absolute", right: "0" }} src={right_arrow} alt="right_arrow" />
</Id>
<Password onClick={() => handleNavigate("/")}>
<Password onClick={() => setIsOpen(true)}>
๋น„๋ฐ€๋ฒˆํ˜ธ ๋ณ€๊ฒฝ
<img style={{ display: "absolute", right: "0" }} src={right_arrow} alt="right_arrow" />
</Password>
</div>
<NotDevelopModal isModalOpen={isOpen} setIsModalOpen={setIsOpen} />
</div>
);
};
Expand Down
14 changes: 9 additions & 5 deletions src/pages/SpacePage/SpaceOption.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import TopBarText, { LeftEnum } from "@/components/TopBarText";
import { To, useNavigate } from "react-router-dom";
import { useState } from "react";
import right_arrow from "@/assets/Space/icon_right_arrow.svg";
import { To, useNavigate } from "react-router-dom";
import styled from "styled-components";

import right_arrow from "@/assets/Space/icon_right_arrow.svg";
import StopModal from "@/components/StopModal";
import * as S from "@/components/StopModal.styled";
import TopBarText, { LeftEnum } from "@/components/TopBarText";
import NotDevelopModal from "@/utils/NotDevelopModal";

const Account = styled.div`
display: flex;
Expand Down Expand Up @@ -51,6 +53,7 @@ const SpaceOption = () => {

const [isLogoutModalOpen, setIsLogoutModalOpen] = useState(false);
const [isWithdrawModalOpen, setIsWithdrawModalOpen] = useState(false);
const [isNotDevModal, setIsNotDevModal] = useState(false);

const handleOpenLogoutModal = () => {
setIsLogoutModalOpen(true);
Expand Down Expand Up @@ -82,12 +85,12 @@ const SpaceOption = () => {
return (
<div>
<TopBarText left={LeftEnum.Back} center="์ „์ฒด ์„ค์ •" right="" />
<div style={{ margin: "0rem 1.25rem 0rem 1.25rem" }}>
<div style={{ margin: "0rem 1.25rem 0rem 1.25rem", cursor: "pointer" }}>
<Account onClick={() => handleNavigate("/space/spaceoption/accountmanage")}>
๊ณ„์ • ์ •๋ณด
<img style={{ display: "absolute", right: "0" }} src={right_arrow} alt="right_arrow" />
</Account>
<Profile onClick={() => handleNavigate("/space/spaceoption/profilemanage")}>
<Profile onClick={() => setIsNotDevModal(true)}>
ํ”„๋กœํ•„ ๊ด€๋ฆฌ
<img style={{ display: "absolute", right: "0" }} src={right_arrow} alt="right_arrow" />
</Profile>
Expand Down Expand Up @@ -121,6 +124,7 @@ const SpaceOption = () => {
confirmButtonText="ํƒˆํ‡ดํ•˜๊ธฐ"
confirmButtonTextColor="#FFFFFF"
/>
<NotDevelopModal isModalOpen={isNotDevModal} setIsModalOpen={setIsNotDevModal} />
</div>
</div>
);
Expand Down
3 changes: 3 additions & 0 deletions src/pages/SpacePage/SpacePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ const GridItem = styled.div`
.space-image {
width: 100%;
height: 100%;
border-radius: 0.75rem;
max-width: 13.75rem;
max-height: 13.75rem;
}
.spaceId {
Expand Down
10 changes: 8 additions & 2 deletions src/utils/NotDevelopModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ interface ModalType {
content?: string[];
}

export const NotDevelopModal = ({ title, content }: ModalType) => {
const [isModalOpen, setIsModalOpen] = useState(false);
export const NotDevelopModal = ({
isModalOpen,
setIsModalOpen,
}: {
isModalOpen: boolean;
setIsModalOpen: React.Dispatch<React.SetStateAction<boolean>>;
}) => {
//const [isModalOpen, setIsModalOpen] = useState(false);

return (
<StopModal
Expand Down

0 comments on commit 7334295

Please sign in to comment.