Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/BoardPreviewCardList.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import styled from 'styled-components';
import { useRef, useState } from 'react';
import { useNavigate } from 'react-router-dom';
function BoardPreviewCardList({ data }) {
const navigate=useNavigate();
const mockData = [
{
title: '상상도 못한 게시판..ㄴ(°0°)ㄱ',
Expand Down Expand Up @@ -55,7 +57,7 @@ function BoardPreviewCardList({ data }) {
>
{data &&
data.map((item) => (
<Card key={item.boardId}>
<Card key={item.boardId} onClick={() => navigate(`/board/post/${item.boardId}`)}>
<h3>{item.title}</h3>
<p>{item.content}</p>
</Card>
Expand Down
15 changes: 11 additions & 4 deletions src/components/BoardPreviewCardWeb.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
import { useNavigate } from 'react-router-dom';
import styled from 'styled-components';
function BoardPreviewCardWeb({ data }) {
const navigate = useNavigate();

if (!Array.isArray(data) || data.length === 0) {
return null; // or 로딩 UI
}

const title = '상상도 못한 게시판..ㄴ(°0°)ㄱ';
const text =
'우오앙 여기도 이런 게시판이 있구나 신기 방기 많이 많이 게시판 이용해야겟다~ 글은 가로길이 800px 넘어가면 다음단락으로 내려가도록... 세줄 넘어가면 ...으로 대체 padding 값은 20px 입니당! 옆에 네모칸은 사진 있을경우 저렇게 쓰면 될것 같고 아래 게시판도 마찬가지로 해당됩니다!';
return (
<Wrapper>
{/*data && (
<div>
{ (
<div onClick={() => navigate(`/board/post/${data[0].boardId}`)}>
<h1>{data[0]?.title}</h1>
<p>{data[0]?.content}</p>
</div>
)*/}
{/*<img src={data[0]?.imgUrl} />*/}
)}
{data[0].imgUrl &&<img src={data[0]?.imgUrl} />}
</Wrapper>
);
}
Expand Down
5 changes: 3 additions & 2 deletions src/components/BoardPreviewList.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useNavigate } from 'react-router-dom';
import styled from 'styled-components';
function BoardPreviewList({ data }) {
/*
Expand All @@ -11,7 +12,7 @@ function BoardPreviewList({ data }) {
];
*/
console.log('게시판 미리보기', data);

const navigate=useNavigate();
const boardTypeLabel = {
NORMAL: '일반',
PROMOTION: '홍보',
Expand All @@ -21,7 +22,7 @@ function BoardPreviewList({ data }) {
<List>
{data &&
data.map((item) => (
<Li key={item.boardId}>
<Li key={item.boardId} onClick={() => navigate(`/board/post/${item.boardId}`)}>
<div>{boardTypeLabel[item.boardType] || item.boardType}</div>
<h3>{item.title}</h3>
<p>{item.content}</p>
Expand Down
13 changes: 8 additions & 5 deletions src/pages/home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Poster from '@/assets/images/test-poster2.png';

import useCustomFetch from '@/utils/hooks/useCustomFetch.js';
import { useNavigate } from 'react-router-dom';
import Footer from '@/components/Footer';

/* 코드 가독성 이슈로 추후 리팩토링 해야할듯 */
const banners = [
Expand Down Expand Up @@ -56,10 +57,10 @@ const banners = [

function Home() {
const navigate = useNavigate();

const {
data: dataClosing,
const navigate = useNavigate();

const {
data: dataClosing,
loading: loadingClosing,
error: errorClosing,
} = useCustomFetch('/amateurs/closing');
Expand Down Expand Up @@ -101,7 +102,7 @@ function Home() {
>
<SearchPC />
</div>
<h1>오늘 마감인 공연</h1>
<h1>오늘 마감인 공연 (데이터 없음)</h1>
<div className="only-web">
{dataClosing?.result && (
<CarouselWeb banners={dataClosing?.result} />
Expand Down Expand Up @@ -142,7 +143,7 @@ function Home() {
<Wrapper style={{ paddingRight: '0px' }}>
<h1 className="only-mobile">게시판</h1>
<Bar>
<h1 style={{ fontSize: '14px', marginBottom: '12px' }}>
<h1 style={{ fontSize: '14px', marginBottom: '12px' }} onClick={()=>navigate('/board')}>
🔥지금 HOT 게시판
</h1>
<ChevronRight />
Expand All @@ -161,7 +162,9 @@ function Home() {
<button className="light only-mobile">게시판 보러가기</button>
</div>
</Wrapper>
<Footer />
</MainContent>

</HomeWrapper>
);
}
Expand Down
13 changes: 10 additions & 3 deletions src/pages/mypage/MyPage.jsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
import styled from 'styled-components';
import HomeIconMenu from '@/components/HomeIconMenu';

import Footer from '@/components/Footer';
import { Outlet } from 'react-router-dom';

function MyPage() {
return (
<>
<MypageWrapper>
<SideMenuWrapper>
<HomeIconMenu isWeb={true} selectedMenu="mypage" />
</SideMenuWrapper>
<Wrapper>
<Outlet />
</Wrapper>
</>

</MypageWrapper>
);
}
export default MyPage;

const MypageWrapper = styled.div`
display:flex;
flex-direction: column;
flex:1;
height: 100vh;
`
const SideMenuWrapper = styled.div`
width: 101px;
height: 100vh;
Expand Down
3 changes: 3 additions & 0 deletions src/pages/mypage/MyPageMenu.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import styled from 'styled-components';
import { useNavigate } from 'react-router-dom';
import Hamburger from '@/components/Hamburger';
import Footer from '@/components/Footer';
import useCustomFetch from '@/utils/hooks/useCustomFetch';
function MyPageMenu() {
const navigate = useNavigate();
Expand Down Expand Up @@ -141,7 +142,9 @@ function MyPageMenu() {
</ul>
</section>
</RightWrapper>

</Wrapper>
<Footer />
</div>
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/pages/register/SmallTheaterRegister.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import styled from 'styled-components';
import TopBar from '@/components/TopBar';
import { Outlet, useLocation, useNavigate } from 'react-router-dom';
import { useState } from 'react';
import Footer from '@/components/Footer';
/* 현재 step 번호 계산*/

function SmallTheaterRegister() {
Expand Down Expand Up @@ -81,6 +82,7 @@ function SmallTheaterRegister() {
<ContentWrapper>
<Outlet context={{ nextStep, prevStep, formData, setFormData }} />
</ContentWrapper>
<Footer />
</Wrapper>
);
}
Expand Down