diff --git a/src/components/calendar/addModal.js b/src/components/calendar/addModal.js index ba3e188e45258ae7f076269209eec71a82f821d3..91a1531203dec5f48d4e2ed4bca0b0842eb39e53 100644 --- a/src/components/calendar/addModal.js +++ b/src/components/calendar/addModal.js @@ -41,12 +41,13 @@ const ScheduleAddModal = ({ isOpen, onClose, onSave }) => { } } + const isSameTime =formData.startHour === formData.endHour && formData.startMinute === formData.endMinute; if (isSameTime) { isValid = false; alert('시작 시간과 종료 시간은 같을 수 없습니다.'); } - + if (formData.repeatPeriod === '' || isNaN(formData.repeatPeriod) || formData.repeatPeriod <= 0) { isValid = false; errors.repeatPeriod = "반복 주기는 1 이상의 숫자여야 합니다."; diff --git a/src/components/calendar/calendar.js b/src/components/calendar/calendar.js index 7fabe2528dcab0fbf08eebd8411451f707432654..bb768a9905cab6caa3f1d3a46dc52ead7c909c4d 100644 --- a/src/components/calendar/calendar.js +++ b/src/components/calendar/calendar.js @@ -100,8 +100,12 @@ const MySchedulerApp = () => { const closeScheduleListModal = () => { setScheduleListModalOpen(false); }; + const handleSaveEvent = async(formData) => { try{ + if (formData.endTime < formData.startTime) { + alert('종료 시간은 시작 시간보다 늦어야 합니다.'); + } const jsonData=JSON.stringify(formData); console.log('Sending data to the server:', jsonData); fetch('api/schedules', { @@ -152,8 +156,6 @@ const MySchedulerApp = () => { for (const backendData of data) { const startDate = new Date(backendData.date); - - // "14:00" 형식의 문자열을 받아 현재 날짜에 추가 const startTimeParts = backendData.startTime.split(':'); const endTimeParts = backendData.endTime.split(':'); const startTime = new Date(startDate); @@ -172,8 +174,6 @@ const MySchedulerApp = () => { title: backendData.title, color:clr, content: backendData.content - - //comment: backendData.Description }); } @@ -402,21 +402,13 @@ const CustomEditItem = (props) => { <MonthView /> </Scheduler> - {/* <span className="buttonhidden">시간표</span> */} </div> <ScheduleAddModal isOpen={isModalOpen} onClose={closeModal} onSave={handleSaveEvent} /> - - - {/* <ScheduleDeleteModal - isOpen={isDeModalOpen} - onClose={closeDeModal} - onDelete={handleChange} - - /> */} + <ScheduleInquiryModal isOpen={isInModalOpen} onClose={closeInModal} diff --git a/src/components/channel/addNotice.js b/src/components/channel/addNotice.js index dc203858807e71c323e7805c4fbbdfdf966d5ef7..f2300dd8a86a330c6d3788dce209b305016f9068 100644 --- a/src/components/channel/addNotice.js +++ b/src/components/channel/addNotice.js @@ -1,7 +1,8 @@ -import React, {useState} from 'react'; +import React, {useState, useContext} from 'react'; import addNoticeStyles from "./addNotice.module.css"; - +import { SearchContext } from '../search'; const AddNotice = ({ isOpen, onClose }) => { + const {setfetchCount}=useContext(SearchContext); const [formData, setFormData] = useState({ title: '', content: '', @@ -52,6 +53,7 @@ const AddNotice = ({ isOpen, onClose }) => { if (response.ok) { // 성공적으로 공지가 생성됨 alert('새로운 공지가 성공적으로 생성되었습니다.'); + setfetchCount( prevNum=> (prevNum+1)); onClose(); } else { // 오류 처리 diff --git a/src/components/channel/channel.js b/src/components/channel/channel.js index c8f52cf0300b73b84acedd7a2f357243a6fe1439..1e65c49540bb173f940d6f956cb9daaff2c24305 100644 --- a/src/components/channel/channel.js +++ b/src/components/channel/channel.js @@ -11,50 +11,7 @@ const Channel=({data})=>{ const toggleSubscribe=()=>{ setSubscribeState(!subscribeState); } - const exampleData={"recruits": [ - { - "id": 2, - "title": "[방탈출]홍대 거상 2인구합니다", - "content": "나이, 성별 상관없습니다. 즐겁게 하실 분 구해요~", - "peopleNum": 4, - "participateNum": 1, - "regionFirst": "강원도", - "regionSecond": "양양군", - "startDate": "2023-10-17", - "endDate": "2023-12-31", - "timeCategory": "D", - "startTime": "13:00:00", - "endTime": "16:00:00", - "state": "Recruiting", - "Writer": { - "id":"jojojo", - "nickname":"jk" - }, - "participants":[1,3,323,108], - "imagePath": "uploads/recruits/default.jpg" - }, - { - "id": 2, - "title": "[방탈출]홍대 거상 2인구합니다", - "content": "나이, 성별 상관없습니다. 즐겁게 하실 분 구해요~", - "peopleNum": 4, - "participateNum": 1, - "regionFirst": "강원도", - "regionSecond": "양양군", - "startDate": "2023-10-17", - "endDate": "2023-12-31", - "timeCategory": "D", - "startTime": "13:00:00", - "endTime": "16:00:00", - "state": "Recruiting", - "Writer": { - "id":"jojojo", - "nickname":"jk" - }, - "participants":[1,3,323,108], - "imagePath": "uploads/recruits/default.jpg" - } - ]} + const handleClick=(e)=>{ const target=e.target.innerText; console.log(target); @@ -128,7 +85,7 @@ function handleSubscribe() { <div className={channel_styles.channelTitle}>{data.data.title}</div> <div className={channel_styles.info}>구독자 {data.data.followerNum}명 모집글{data.data.recruitNum}개</div> <div className={channel_styles.description}>{data.data.content}</div> - <button onClick={handleSubscribe}>{subscribeState ? '구독 취소' : '구독중'}</button> + <button onClick={handleSubscribe}>구독</button> </div> )} </div> diff --git a/src/components/channel/channelList.js b/src/components/channel/channelList.js index 3f5cb46accbe7f8fd3d64461e40ce88b7c20730b..162bb02db514fc0f9a71922c841d57329b0628ae 100644 --- a/src/components/channel/channelList.js +++ b/src/components/channel/channelList.js @@ -17,7 +17,7 @@ function ChannelItem(props){ function handleClick() { try { // 아래 URL을 실제 사용하는 API 엔드포인트로 변경하세요. - const apiUrl = `/api/channels/${props.userID}`; + const apiUrl = `/api/channels/${props.props.id}`; openModal(); fetch(apiUrl, { method: 'GET', @@ -45,19 +45,7 @@ function ChannelItem(props){ } catch (error) { console.error('Error:', error); } - } - // const props = - - - // { - // "userID": 5, - // "nickname":"liel", - // "title": "채널명", - // "content": "소개글", - // "imagePath": "uploads/recruits/default.jpg", - // } - - + } return ( <div className={channelListStyles.flex}> @@ -65,7 +53,7 @@ function ChannelItem(props){ <span className={channelListStyles.channel}> <div className={channelListStyles.container} onClick={handleClick}> <div className={channelListStyles.imgContainer}> - {props.thumbnailImgPath ? (<img className={channelListStyles.img} src={props.thumbnailImgPath} alt='recruit img' />) : (<img src={props.thumbnailImgPath} />)} + <img className={channelListStyles.img} src={props.props.thumbnailImgPath} alt='recruit img' /> </div> <div className={channelListStyles.mouseover}> <p className={channelListStyles.content}> @@ -91,7 +79,8 @@ function ChannelList(){ <div className={channelListStyles.RecruitList}> <InfiniteScroll pagename='channels' queryString1="" - queryString2="" /> + queryString2="" + min="minDate" /> </div> ) } diff --git a/src/components/channel/existingChannel.js b/src/components/channel/existingChannel.js index f9f7d5a85f23b610195c4b25498961394668ecd3..480a7034e3acfa848537fe871546bb02eb90683e 100644 --- a/src/components/channel/existingChannel.js +++ b/src/components/channel/existingChannel.js @@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom'; import existingStyles from './existingChannel.module.css' import Channel from './channel'; import AddNotice from './addNotice'; - +// import { SearchContext } from '../search'; import ChangeIcon from './iconModal'; import ChangePicture from './pictureModal'; @@ -13,6 +13,7 @@ const ExistingChannel=({isOpen, onClose, data})=>{ const { userData } = useContext(AuthContext); const [changePicture, setChangePicture]=useState(''); const [changeIcon, setChangeIcon]=useState(''); + // const {setfetchCount}=useContext(SearchContext); const openModal=()=>{ setIsModal(true); } diff --git a/src/components/channel/iconModal.js b/src/components/channel/iconModal.js index ef5a1e39ab82ee3d826953700c770239c2d12f94..e154d9205f1f592c6150987ad90b4a58d85271dc 100644 --- a/src/components/channel/iconModal.js +++ b/src/components/channel/iconModal.js @@ -1,8 +1,9 @@ -import React, { useState } from 'react'; +import React, { useState, useContext} from 'react'; import iconStyles from './iconModal.module.css'; - +import { SearchContext } from '../search'; const ChangeIcon=({ isOpen, onClose})=> { const [image, setImage] = useState(null); + const {setfetchCount}=useContext(SearchContext); const handleImageChange = (e) => { @@ -34,6 +35,7 @@ const ChangeIcon=({ isOpen, onClose})=> { const successData = await response.json(); console.log(successData); alert('채널 프로필 수정을 성공하였습니다.'); + setfetchCount( prevNum=> (prevNum+1)); onClose(); // 프로필 수정 후 로직 (예: 화면 갱신 등) } catch (error) { diff --git a/src/components/channel/iconModal.module.css b/src/components/channel/iconModal.module.css index 013b7f894cff3064a2ee07fdfbad62206fa12b8b..8c1138fa576bc81d71d87a2dd8cb7b1d03a9834d 100644 --- a/src/components/channel/iconModal.module.css +++ b/src/components/channel/iconModal.module.css @@ -26,10 +26,16 @@ .profile_image { - width:150px; + display: flex; + justify-content: center; + align-items: center; + width: 150px; height: 150px; - overflow: hidden; border-radius: 50%; + margin-bottom: 10px; + margin-top:5%; + margin-left:30% + } /* .profile_image img { diff --git a/src/components/channel/myChannelModal.js b/src/components/channel/myChannelModal.js index e8c473bbe1fe6b5305f65a04ef1ee67a60246ff4..fd17db3683366eb6acaca8fe36ea1abae7394400 100644 --- a/src/components/channel/myChannelModal.js +++ b/src/components/channel/myChannelModal.js @@ -2,7 +2,6 @@ import React, {useState, useEffect} from 'react'; import { useNavigate } from 'react-router-dom'; import modalStyles from "./myChannelModal.module.css"; import CreateChannel from './createChannel' - const MyChannelModal=({isOpen, onClose})=>{ const [IsCreateModal, setCreateModal]=useState(false); const openCreateModal=()=>{ diff --git a/src/components/channel/pictureModal.js b/src/components/channel/pictureModal.js index b73c2769404247ae66668c5e87cbe04181e2aa44..3419e2c2198a3ff7bae580d51eccab7278e3acee 100644 --- a/src/components/channel/pictureModal.js +++ b/src/components/channel/pictureModal.js @@ -1,9 +1,9 @@ -import React, { useState } from 'react'; +import React, { useState, useContext } from 'react'; import pictureStyles from './pictureModal.module.css'; - +import { SearchContext } from '../search'; const ChangePicture=({ isOpen, onClose})=> { const [image, setImage] = useState(null); - + const {setfetchCount}=useContext(SearchContext); const handleImageChange = (e) => { const selectedImage = e.target.files[0]; @@ -34,6 +34,7 @@ const ChangePicture=({ isOpen, onClose})=> { const successData = await response.json(); console.log(successData); alert('채널 배경 사진 수정을 성공하였습니다.'); + setfetchCount( prevNum=> (prevNum+1)); onClose(); // 프로필 수정 후 로직 (예: 화면 갱신 등) diff --git a/src/components/channel/pictureModal.module.css b/src/components/channel/pictureModal.module.css index ba84512f28a972e6c102f70a85bd8e3c12997fdc..1ae06e251d77814796ee5487dc1dd35163b80b83 100644 --- a/src/components/channel/pictureModal.module.css +++ b/src/components/channel/pictureModal.module.css @@ -26,10 +26,14 @@ .profile_image { - width:200px; + display: flex; + justify-content: center; + align-items: center; + width: 200px; height: 150px; - overflow: hidden; - border-radius: 50%; + margin-bottom: 10px; + margin-top:5%; + margin-left:23% } /* .profile_image img { diff --git a/src/components/infiniteScroll.js b/src/components/infiniteScroll.js index 2265f5e68c9bebfc8209399a064b0e79c4b00461..a4044f1a7acd2e79b7bc777dc55ea395d1427fdd 100644 --- a/src/components/infiniteScroll.js +++ b/src/components/infiniteScroll.js @@ -19,7 +19,6 @@ function InfiniteScroll(props){ try{ const response = await fetch(`/api/${page}${queryString1}`); const jsonData = await response.json(); - if(page==='channels'){ setMinDate(jsonData['minDate']); const newData = jsonData[page]; @@ -77,7 +76,9 @@ function InfiniteScroll(props){ setIsLoading(true); - try{ + + try{ + if(page==='channels'){ const response = await fetch(`/api/${page}?${min}=${minDate}${queryString2}`); const jsonData = await response.json(); @@ -100,8 +101,8 @@ function InfiniteScroll(props){ } setItems((prevItem) => [...prevItem, ...components]); } - }else if(page==='recruits'){ - const response = await fetch(`/api/${page}?${min}=${minId}${queryString2}`); + }else if(page==='recruits'){ + const response = await fetch(`/api/${page}?${min}=${minId}${queryString2}`); const jsonData = await response.json(); setMinId(jsonData['minId']); const newData = jsonData[page]; diff --git a/src/components/mainAside.js b/src/components/mainAside.js index d029df0c3382a44560cecf1c576b163ff6449fb8..72c09150a1ba06dcd29b8c078bc3dedbabee54ea 100644 --- a/src/components/mainAside.js +++ b/src/components/mainAside.js @@ -28,7 +28,6 @@ function NextSchedule(props) { function Notice(props){ const { subscribeNotices } = props.data; - if (!subscribeNotices || !Array.isArray(subscribeNotices) || subscribeNotices.length === 0) { return <p className={styles.noContent}>최근 공지가 없습니다.</p>; } @@ -36,6 +35,7 @@ function Notice(props){ const sortedNotice = subscribeNotices.sort((a, b) => a.date - b.date); const noticeComponents = sortedNotice.map((notice) => ( <p className={styles.noticeContent}> + <img className={styles.img} src={notice.channelIconImg} alt="프로필"></img> <span className={styles.channel}>{notice.channelNickname}</span> <span className={styles.noticeTitle}>{notice.title}</span> <span className={styles.content}>{notice.content}</span> diff --git a/src/components/mainAside.module.css b/src/components/mainAside.module.css index 6f87b7740dbf92d6004dca234af4f594adbf86f6..b3edf68d78e97f15616a3e9af6cdcb71f683efa9 100644 --- a/src/components/mainAside.module.css +++ b/src/components/mainAside.module.css @@ -32,6 +32,7 @@ flex: 1; height: 50vh; overflow-y: auto; + overflow-x:hidden; padding: 10px; margin: 10px; width:100%; @@ -53,9 +54,12 @@ .noticeContent{ display: grid; grid-template-columns: 1fr; /* 한 개의 열 */ - height: auto; + + width: 400px; + height: 100px; border: 2px solid #d6d6d6; border-radius: 3px; + margin-bottom: 10px; } .title{ @@ -65,14 +69,17 @@ .channel{ + font-weight: bold; + margin-left:15px; } .noticeTitle{ - + margin-left:30px; } .content{ - + margin-left:30px; + font-size:15px; } .nextSchedule::-webkit-scrollbar, .notice::-webkit-scrollbar{ @@ -88,4 +95,7 @@ background-color: grey; border-radius: 10px; box-shadow: inset 0px 0px 5px white; +} +.img{ + width:100px; } \ No newline at end of file diff --git a/src/components/mypage/my_editModal.js b/src/components/mypage/my_editModal.js index 139762616553ec0f43b829d4aece9a395039dd0c..a06c7faa9acfd8da764c126ae253081344e0fad8 100644 --- a/src/components/mypage/my_editModal.js +++ b/src/components/mypage/my_editModal.js @@ -1,28 +1,32 @@ -import React, { useState } from 'react'; +import React, { useState ,useContext, useEffect} from 'react'; import editmodal_styles from './my_editModal.module.css'; - +import { AuthContext } from '../../App'; const MypageEdittModal=({ isOpen, closeModal, onSave, user})=> { const [image, setImage] = useState(null); const [nickname, setNickname] = useState(''); const [statusMessage, setStatusMessage] = useState(''); const [isNicknameAvailable, setIsNicknameAvailable] = useState(false); + const { userData, setUserData } = useContext(AuthContext); const handleImageChange = (e) => { const selectedImage = e.target.files[0]; setImage(selectedImage); }; - + const handleSave = () => { if (!isNicknameAvailable) { alert('닉네임 중복 확인을 해주세요.'); return; } onSave({ image, nickname, statusMessage }); + setUserData({ ...userData, nickname, statusMessage }); + setIsNicknameAvailable(false); closeModal(); }; const handlecheckBtn = async ()=>{ try{ const response = await fetch(`/api/users/nickname/${nickname}`); const data = await response.json(); + if (response.status === 200){ alert(data.message); diff --git a/src/components/mypage/my_group.js b/src/components/mypage/my_group.js index d05fe0cb24d6e3ca7ac166b91a27c1f5f464df32..ffca5290f24f267e081bb465b0ca50d1a70132c2 100644 --- a/src/components/mypage/my_group.js +++ b/src/components/mypage/my_group.js @@ -13,7 +13,7 @@ const MypagegroupModal=({ isOpen,closeModal})=> { if (!response.ok) { // 서버에서 에러 응답이 온 경우 처리합니다. const errorData = await response.json(); - throw new Error(`회원탈퇴 실패: ${errorData.message}`); + throw new Error(`조회 실패: ${errorData.message}`); } // 성공적으로 처리된 경우, 추가적인 로직을 작성할 수 있습니다. diff --git a/src/components/mypage/mywritingModal.js b/src/components/mypage/mywritingModal.js index 96adef2607c8e03e8435fb0253d3a98924b65f6e..03338560dc069d381fd8b22b877efe5705c667dc 100644 --- a/src/components/mypage/mywritingModal.js +++ b/src/components/mypage/mywritingModal.js @@ -15,7 +15,7 @@ const MywritingModal=({ isOpen,closeModal})=> { if (!response.ok) { // 서버에서 에러 응답이 온 경우 처리합니다. const errorData = await response.json(); - throw new Error(`회원탈퇴 실패: ${errorData.message}`); + throw new Error(`조회 실패: ${errorData.message}`); } // 성공적으로 처리된 경우, 추가적인 로직을 작성할 수 있습니다. diff --git a/src/components/mypage/quit.module.css b/src/components/mypage/quit.module.css deleted file mode 100644 index 4d9199203c64e581d83b531b2f1cc904c3ac297d..0000000000000000000000000000000000000000 --- a/src/components/mypage/quit.module.css +++ /dev/null @@ -1,68 +0,0 @@ -/* Modal.css */ - - -.quitmodal{ - display: none; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: rgba(0, 0, 0, 0.5); /* 반투명한 배경 */ - justify-content: center; - align-items: center; - z-index: 1000; -} - -.quitmodal.open{ - display: flex; - z-index: 1000; - - -} -.qumodal_overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: rgba(0, 0, 0, 0.5); - display: flex; - align-items: center; - justify-content: center; - z-index:1000; - -} - -.qumodal { - background: #fff; - width: 300px; - padding: 20px; - border-radius: 8px; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); - text-align: center; - z-index:1000; - -} - -.qumodal p { - margin-bottom: 20px; -} - -.qumodal button { - cursor: pointer; - padding: 10px 20px; - background-color: #9FB8AB; - color: #fff; - border: none; - border-radius: 5px; - margin-right: 10px; - border: none; - border-radius: 5px; - box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2); /* 그림자 추가 */ - transition: background-color 0.3s, color 0.3s, transform 0.3s; -} - - - -/* Header.js에서 Modal 컴포넌트 사용 시에는 .modal-overlay 스타일을 포함해야 합니다. */ diff --git a/src/components/mypage/quitModal.js b/src/components/mypage/quitModal.js deleted file mode 100644 index ec44ff9ca8d88ca8a548734c0b9cc95df8793c47..0000000000000000000000000000000000000000 --- a/src/components/mypage/quitModal.js +++ /dev/null @@ -1,24 +0,0 @@ -import React, {useState} from 'react'; -import { useNavigate } from 'react-router-dom'; -import quit_styles from "./quit.module.css" - - -const MyQuitModal=({modalOpen, closeModal, handleDeleteAccount})=>{ - return( - <div className={`${quit_styles.quitmodal} ${modalOpen ? quit_styles.open : ''}`}> - - - <div className={quit_styles.qumodal_overlay}> - <div className={quit_styles.qumodal}> - <p>정말 탈퇴하시겠습니까?</p> - <button onClick={handleDeleteAccount}>탈퇴</button> - <button onClick={closeModal}>취소</button> - </div> - </div> - - - </div> - ) -} -export default MyQuitModal; - diff --git a/src/components/recruit/recruitDetail.module.css b/src/components/recruit/recruitDetail.module.css index ca2295b1e1e4d1e109e0e74d63196db82dc6d7c8..ff7bd9b7c2966baa7180c3c5c56d151462c4ccec 100644 --- a/src/components/recruit/recruitDetail.module.css +++ b/src/components/recruit/recruitDetail.module.css @@ -112,7 +112,7 @@ align-items: center; /* 세로 방향에서 가운데 정렬. */ justify-content: center; - width: 67px; + width: 90px; height: 33px; margin-left: auto; diff --git a/src/components/search.js b/src/components/search.js index 93f9fe7005d9327a2262dffd8d6b8856a286ea9d..ba52d5109354d2613be77fa34b2f693ecaf68dec 100644 --- a/src/components/search.js +++ b/src/components/search.js @@ -1,10 +1,10 @@ -import React, { useState } from 'react'; +import React, { useState, createContext, useEffect } from 'react'; import { useNavigate } from "react-router-dom"; import searchStyles from './search.module.css'; import CreateRecruit from './recruit/createRecruit'; import MyChannelModal from './channel/myChannelModal'; import ExistingChannel from './channel/existingChannel'; - +export const SearchContext = createContext(); function Search({ currentPage, onUrlGenerated, onFirstQueryString, onSecondQueryString }){ const [isModalOpen, setIsModalOpen] = useState(false); const [searchTerm, setSearchTerm] = useState(''); @@ -12,7 +12,12 @@ function Search({ currentPage, onUrlGenerated, onFirstQueryString, onSecondQuery const [sortType, setSortType] = useState(''); const [haveChannel, sethaveChannel]=useState(true); const [myChannelData, setmyChannelData]=useState(''); - + const [fetchCount, setfetchCount] = useState(0); + const searchValue = { + fetchCount, + setfetchCount, + }; + const navigate = useNavigate(); const openModal = () => { @@ -51,7 +56,10 @@ function Search({ currentPage, onUrlGenerated, onFirstQueryString, onSecondQuery console.error('Error fetching weekly schedules:', error); } }; - + useEffect(() => { + + fetchChannelData(); + }, [fetchCount]); const handleSearch = () => { let searchURL = `${currentPage}/search`; let firstQueryString = '?'; @@ -142,12 +150,15 @@ function Search({ currentPage, onUrlGenerated, onFirstQueryString, onSecondQuery {currentPage === 'recruits' && ( <CreateRecruit isOpen={isModalOpen} onClose={closeModal}/> )} + {currentPage === 'subscribes' && (!haveChannel)&&( <MyChannelModal isOpen={isModalOpen} onClose={closeModal}/> )} + <SearchContext.Provider value={searchValue}> {currentPage==='subscribes' && (haveChannel) &&( <ExistingChannel isOpen={isModalOpen} onClose={closeModal} data={myChannelData}/> )} + </SearchContext.Provider> </div> ) diff --git a/src/pages/login.module.css b/src/pages/login.module.css index 067947a4b02566fb51c0ec0b0d2e9a8bda066000..98a429717a9030b244d3368ca66f2b0baccd59dd 100644 --- a/src/pages/login.module.css +++ b/src/pages/login.module.css @@ -120,3 +120,6 @@ } +.loginText{ + cursor: pointer; +} diff --git a/src/pages/mypage.js b/src/pages/mypage.js index aa5fb6e3e92b0a4df06552759919c43d00797dd0..a18fe7444a9a7138932f6a13dc7f35fc35dfd4e7 100644 --- a/src/pages/mypage.js +++ b/src/pages/mypage.js @@ -4,9 +4,7 @@ import Header from '../components/Header' import MypageEdittModal from '../components/mypage/my_editModal'; import MypageInfoModal from '../components/mypage/my_infoModal'; import MypagegroupModal from '../components/mypage/my_group'; -import MyQuitModal from '../components/mypage/quitModal'; import MywritingModal from '../components/mypage/mywritingModal'; -import { useRouteLoaderData } from 'react-router-dom'; import { AuthContext } from '../App'; const Mypage=()=>{ const [isEditModal, setIsEditModal]=useState(false); @@ -16,7 +14,6 @@ const Mypage=()=>{ const [isInfoModal, setIsinfoModal]=useState(false); const [isMygroup, setIsmygroup]=useState(false); const { userData } = useContext(AuthContext); - const [quitModalOpen, setQuitModalOpen] = useState(false); const [isProcessing, setProcessing] = useState(false); const [isMywriting, setIsmyWriting]=useState(false); const [channelList, setChannelList]=useState([]); @@ -39,12 +36,6 @@ const Mypage=()=>{ const closeMygroup=()=>{ setIsmygroup(false); } - const openQuitModal=()=>{ - setQuitModalOpen(true); - } - const closeQuitModal=()=>{ - setQuitModalOpen(false); - } const toggleChannelList = () => { setIsChannelListOpen(!isChannelListOpen); }; @@ -108,7 +99,7 @@ const Mypage=()=>{ }); if (!response.ok) { const errorData = await response.json(); - throw new Error(`회원탈퇴 실패: ${errorData.message}`); + throw new Error(`실패: ${errorData.message}`); } diff --git a/src/pages/mypage.module.css b/src/pages/mypage.module.css index 71c8ac90972efb779cc159b82caf544b2831c19d..efa94c9b1d220bacbf22ee0005e2a047528c0deb 100644 --- a/src/pages/mypage.module.css +++ b/src/pages/mypage.module.css @@ -1,17 +1,10 @@ -.myprofile_body { - display: flex; - justify-content: center; - - height: 100vh; /* 뷰포트 높이의 100%로 설정하여 전체 화면을 사용 */ - -} .profilebox{ border-radius: 0px; border: 2px solid #ccc; /* border-width, border-style, border-color를 한 번에 설정 */ padding: 20px; - height: 20%; + height: 140px; margin-bottom:8%;