-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from jeeyn/main
feat: IDE Page UI 프레임 작업 완료
- Loading branch information
Showing
16 changed files
with
1,637 additions
and
69 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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
4 changes: 3 additions & 1 deletion
4
...ages/IDEPage/CodeEditor/styles.module.css → src/components/ide/CodeEditor.module.css
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,6 +1,8 @@ | ||
.codeEditorContainer { | ||
position: relative; | ||
float: right; | ||
height: calc(100vh - 50px); | ||
padding-top: 50px; | ||
margin-top: 50px; | ||
flex-shrink: 0; | ||
flex-direction: row; | ||
} |
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,73 @@ | ||
import axios from "axios"; | ||
import React, { useEffect, useState } from "react"; | ||
import { useNavigate, useParams } from "react-router-dom"; | ||
// import Chat from "./Chat"; | ||
// import Stopwatch from "./Stopwatch"; | ||
import styles from "./IDEBottomBar.module.css"; | ||
|
||
export const IdeBottomBar = ({ sender, setSender, isDarkMode }) => { | ||
// const navigate = useNavigate(); | ||
// const { uuidParam, questionIdParam } = useParams(); | ||
// const [isChatOpen, setIsChatOpen] = useState(false); | ||
|
||
// // IDE로 리다이렉트시 url 파라미터에서 받을 내용 | ||
// const [uuid, setUuid] = useState(""); | ||
|
||
// // roomId는 uuid + questionId | ||
// const [roomId, setRoomId] = useState(""); | ||
|
||
// // 채팅방에서 사용할 userName 받아오는 함수 | ||
// const fetchUserName = async () => { | ||
// await axios | ||
// .get("https://api.hong-sam.online/", { withCredentials: true }) | ||
// .then((res) => { | ||
// if (res.data.status === 400 && sender) { | ||
// return; | ||
// } else if (res.data.status === 400) { | ||
// alert(res.data.data); | ||
// navigate(`/${uuidParam}/${questionIdParam}/guest`); | ||
// } else if (res.data.status === 200) { | ||
// setSender(res.data.data.username); | ||
// } | ||
// }) | ||
// .catch((err) => { | ||
// console.log(err); | ||
// }); | ||
// }; | ||
|
||
// // IDE 페이지 진입 시 url로 받아온 Params를 이용하여 RoomId와 uuid를 초기화해준다 | ||
// useEffect(() => { | ||
// fetchUserName(); | ||
// const tmpRoomId = uuidParam + questionIdParam; | ||
// setUuid(uuidParam); | ||
// setRoomId(tmpRoomId); | ||
// }, []); | ||
|
||
// const openChat = () => { | ||
// isChatOpen ? setIsChatOpen(false) : setIsChatOpen(true); | ||
// }; | ||
return ( | ||
<> | ||
<div | ||
className={`${ | ||
styles.ideBottomBarContainer | ||
} flex w-screen absolute bottom-0 border-t z-10 ${ | ||
isDarkMode ? "bg-zinc-800 text-white" : "bg-white" | ||
}}`} | ||
> | ||
<div | ||
className={` ${ | ||
isDarkMode ? "bg-zinc-800 text-white" : "bg-white" | ||
} grow`} | ||
></div> | ||
<div>Bottom Bar</div> | ||
{/* <div className="pr-5 pt-2 pb-2"> | ||
<Stopwatch /> | ||
</div> | ||
<button className="pr-5 pt-2 pb-2" onClick={openChat}> | ||
Chat | ||
</button> */} | ||
</div> | ||
</> | ||
); | ||
}; |
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,10 @@ | ||
.ChatContainer { | ||
position: fixed; | ||
right: 15px; | ||
bottom: 60px; | ||
border: 1px solid var(--main-color); | ||
border-radius: 10px; | ||
} | ||
.ideBottomBarContainer { | ||
border-color: var(--main-color); | ||
} |
File renamed without changes.
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,29 @@ | ||
import React, { useEffect, useState } from "react"; | ||
import styles from "./QuestionMenu.module.css"; | ||
import ReactMarkDown from "react-markdown"; | ||
import remarkGfm from "remark-gfm"; | ||
|
||
export const QuestionMenu = ({ leftWidth, handleMouseDown }) => { | ||
return ( | ||
<div | ||
className={`${styles.questionMenuContainer} flex`} | ||
style={{ | ||
width: `${leftWidth}%`, | ||
}} | ||
> | ||
<div className={`questionFont overflow-y-scroll w-full border-r`}> | ||
<div className={`text-3xl p-5 border-b`}> | ||
<ReactMarkDown remarkPlugins={[remarkGfm]}>Title</ReactMarkDown> | ||
</div> | ||
<div className={`p-5 border-b`}> | ||
<p className="text-lg mb-3">문제 설명</p> | ||
<ReactMarkDown remarkPlugins={[remarkGfm]}>Content</ReactMarkDown> | ||
</div> | ||
</div> | ||
<div | ||
className="w-1 cursor-col-resize" | ||
onMouseDown={handleMouseDown} | ||
></div> | ||
</div> | ||
); | ||
}; |
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,8 @@ | ||
.questionMenuContainer { | ||
flex-shrink: 0; | ||
user-select: none; | ||
position: relative; | ||
float: left; | ||
height: calc(100vh - 50px); | ||
margin-top: 50px; | ||
} |
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,31 @@ | ||
import React from "react"; | ||
// import styles from "./ResultArea.module.css"; | ||
|
||
import { ResultTopBar } from "./ResultTopBar"; | ||
|
||
export const ResultArea = ({ result, topHeigth, handleMouseDown }) => { | ||
return ( | ||
<div | ||
// className={`${styles.resultTermContainer} border-t`} | ||
style={{ | ||
maxHeight: `calc(100% - ${topHeigth}%)`, | ||
}} | ||
> | ||
<div | ||
className="w-full h-1 cursor-row-resize " | ||
onMouseDown={handleMouseDown} | ||
></div> | ||
<ResultTopBar /> | ||
<div> | ||
<p className="pl-5 whitespace-pre-line"> | ||
{result.split("\n").map((line, index) => ( | ||
<span key={index}> | ||
{line} | ||
<br /> | ||
</span> | ||
))} | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
}; |
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,12 @@ | ||
import React from "react"; | ||
|
||
export const ResultTopBar = () => { | ||
return ( | ||
<div> | ||
<div className="flex h-3"> | ||
<div className="grow"></div> | ||
<button className="h-full p-1"></button> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
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
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,19 +1,17 @@ | ||
import React, { useState } from 'react' | ||
import { ModifyComponent } from '../../components/member/modifyComponent' | ||
import { useCustomLogin } from '../../hooks/useCustomLogin' | ||
|
||
import React, { useState } from "react"; | ||
import { ModifyComponent } from "../../components/member/ModifyComponent"; | ||
import { useCustomLogin } from "../../hooks/useCustomLogin"; | ||
|
||
export const MyPage = () => { | ||
|
||
const {isLogin, moveToLoginReturn} = useCustomLogin() | ||
const { isLogin, moveToLoginReturn } = useCustomLogin(); | ||
|
||
if (!isLogin) { | ||
return moveToLoginReturn() | ||
return moveToLoginReturn(); | ||
} | ||
|
||
return ( | ||
<div> | ||
<ModifyComponent /> | ||
</div> | ||
) | ||
} | ||
); | ||
}; |