Skip to content

Commit

Permalink
Fix:실전모드 버튼 클릭 및 스피너 UI추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Wisdom-Kim committed Aug 5, 2024
1 parent d86f8f6 commit fe607c2
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 17 deletions.
1 change: 1 addition & 0 deletions src/components/posts/EditorBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const EditorBox = forwardRef((props, ref) => {
placeholder="내용을 적어주세요!"
previewStyle="vertical"
height="600px"
initialEditType="wysiwyg"
useCommandShortcut={true}
language="ko-KR"
ref={ref}
Expand Down
4 changes: 3 additions & 1 deletion src/components/posts/EditorViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { Viewer } from '@toast-ui/react-editor';
import '@toast-ui/editor/dist/toastui-editor-viewer.css';

function EditorViewer({ contents }) {
return <Viewer initialValue={contents || ''} />;
return <Viewer
initialValue={contents || ''}
/>;
}

export default EditorViewer;
9 changes: 6 additions & 3 deletions src/pages/community/CommunityInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import GlassCard from "../../components/GlassCard";
import PageButtonController from '../../components/PageButtonController';
import GlassModal from "../../components/modal/GlassModal";
import GlassInput from '../../components/GlassInput';
import { CircularProgress } from '@mui/material';

const Title = styled.div`
display: flex;
Expand Down Expand Up @@ -139,10 +140,10 @@ const CommunityQNA = () => {
</MainHeader>
<MainBody>
<MainContent>
{data &&
{data ?(
data.resultList.map((post, idx) => (
<GlassCard
width={"60vw"}
width={"58vw"}
key={idx}
onClick={
() => navigate(`/post/${post.postId}`)}>
Expand All @@ -152,7 +153,9 @@ const CommunityQNA = () => {
<span>작성일 : {formatDate(post.createTime)}</span>
</PostDetails>
</GlassCard>
))
))):(
<CircularProgress color="secondary" />
)
}
</MainContent>
<PageButtonController
Expand Down
10 changes: 5 additions & 5 deletions src/pages/community/CommunityMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import Block from '../../components/Block';
import NPGlassCard from '../../components/NoPaddingGlassCard';
import GlassTitle from '../../components/GlassTitle';
import GlassModal from "../../components/modal/GlassModal";
import { CircularProgress } from '@mui/material';

const ContainerWrapper = styled.div`
width:60vw;
`

const ContainerRow = styled.div`
Expand Down Expand Up @@ -203,14 +203,14 @@ const CommunityMain = () => {
<a href='/community/qna' style={{ color: palette.gray, textDecorationLine: 'none' }}>+ 더보기</a>
</GlassTitle>
<ul style={{ padding: '3vh 0', margin: '0 3vw' }}>
{qnaData ?
{qnaData[0] ?
(qnaData.map((data, idx) => {
return (
<CustomLi key={idx} data={data}></CustomLi>
)
}))
:
(<div>게시글이 없네요!</div>)
(<CircularProgress color="secondary" />)
}
</ul>
</NPGlassCard>
Expand All @@ -224,14 +224,14 @@ const CommunityMain = () => {
<a href='/community/info' style={{ color: palette.gray, textDecorationLine: 'none' }}>+ 더보기</a>
</GlassTitle>
<ul style={{ padding: '3vh 0', margin: '0 3vw' }}>
{infoData ?
{infoData[0] ?
(infoData.map((data, idx) => {
return (
<CustomLi key={idx} data={data}></CustomLi>
)
}))
:
(<div>게시글이 없네요!</div>)
(<CircularProgress color="secondary" />)
}
</ul>
</NPGlassCard>
Expand Down
11 changes: 7 additions & 4 deletions src/pages/community/CommunityQNA.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import GlassCard from "../../components/GlassCard";
import PageButtonController from '../../components/PageButtonController';
import GlassModal from "../../components/modal/GlassModal";
import GlassInput from '../../components/GlassInput';
import { CircularProgress } from '@mui/material';

const Title = styled.div`
display: flex;
Expand Down Expand Up @@ -141,11 +142,11 @@ const CommunityQNA = () => {
</CustomButton>
</MainHeader>
<MainBody>
<MainContent>
{data &&
<MainContent>
{data ?(
data.resultList.map((post, idx) => (
<GlassCard
width={"60vw"}
width={"58vw"}
key={idx}
onClick={
() => navigate(`/post/${post.postId}`)}>
Expand All @@ -155,7 +156,9 @@ const CommunityQNA = () => {
<span>작성일 : {formatDate(post.createTime)}</span>
</PostDetails>
</GlassCard>
))
))):(
<CircularProgress color="secondary" />
)
}
</MainContent>
<PageButtonController
Expand Down
4 changes: 4 additions & 0 deletions src/pages/interview/InterviewChoiceStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ const InterviewChoiceStack = () => {
fetchMemberStack();
}, [fetchMemberStack]);



const handleButtonClick = (stack) => {
if (stack.isPurchase) {
setStacks(stacks.map((s) =>
Expand Down Expand Up @@ -116,6 +118,8 @@ const InterviewChoiceStack = () => {
width={"150px"}
key={idx}
onClick={() => handleButtonClick(stack)}
color={stack.selected
? (palette.purple): ( palette.dark)}
>
{stack.stackName}
</CustomButton>
Expand Down
9 changes: 5 additions & 4 deletions src/pages/interview/PracticeChoiceStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ const Main = styled.div`
`;

const Content = styled.div`
display: grid;
margin: 20px 20px;
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 30px;
display: flex;
justify-content:space-evenly;
flex-wrap: wrap;
margin: 20px 10vw;
gap: 5px;
`;

const ModalContent = styled.div`
Expand Down

0 comments on commit fe607c2

Please sign in to comment.