Skip to content
Snippets Groups Projects
Commit 741f9f28 authored by Gaeon Kim's avatar Gaeon Kim
Browse files

design: main, mypage css

parent 4847d788
No related branches found
No related tags found
No related merge requests found
......@@ -19,10 +19,6 @@ function InfiniteScroll(props){
try{
const response = await fetch(`/api/${page}${queryString1}`);
const jsonData = await response.json();
const newData = jsonData[page];
setMinId(jsonData['minId']);
setMinDate(jsonData['minDate']);
if(page==='channels'){
setMinDate(jsonData['minDate']);
const newData = jsonData[page];
......@@ -79,13 +75,8 @@ function InfiniteScroll(props){
setIsLoading(true);
try{
const response = await fetch(`/api/${page}?minId=${minId}${queryString2}`);
console.log(`/api/${page}?minId=${minId}${queryString2}`);
const jsonData = await response.json();
const newData = jsonData[page];
setMinId(jsonData['minId']);
try{
if(page==='channels'){
const response = await fetch(`/api/${page}?${min}=${minDate}${queryString2}`);
......@@ -109,8 +100,11 @@ function InfiniteScroll(props){
}
setItems((prevItem) => [...prevItem, ...components]);
}
}else {
}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];
if(newData.length > 0) {
const components = newData.map((item) => (
<PageItem data={item}/>
......
......@@ -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>
......
......@@ -32,6 +32,7 @@
flex: 1;
height: 50vh;
overflow-y: auto;
overflow-x:hidden;
padding: 10px;
margin: 10px;
width:100%;
......@@ -54,10 +55,11 @@
display: grid;
grid-template-columns: 1fr; /* 한 개의 열 */
width: 300px;
width: 400px;
height: 100px;
border: 2px solid #d6d6d6;
border-radius: 3px;
margin-bottom: 10px;
}
.title{
......@@ -67,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{
......@@ -91,3 +96,6 @@
border-radius: 10px;
box-shadow: inset 0px 0px 5px white;
}
.img{
width:100px;
}
\ No newline at end of file
......@@ -108,7 +108,7 @@
align-items: center; /* 세로 방향에서 가운데 정렬. */
justify-content: center;
width: 67px;
width: 90px;
height: 33px;
margin-left: auto;
......
......@@ -74,7 +74,7 @@
align-items: center; /* 세로 방향에서 가운데 정렬. */
justify-content: center;
width: 67px;
width: 90px;
height: 33px;
margin-left: auto;
......
.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%;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment