Skip to content

Commit

Permalink
feat: search 파일 구조 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Kangyeeun0 committed Jul 6, 2024
1 parent fd153d5 commit fd896e2
Show file tree
Hide file tree
Showing 42 changed files with 48 additions and 1,701 deletions.
20 changes: 8 additions & 12 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import { useMediaQuery } from 'react-responsive';
import { BrowserRouter, Routes, Route } from 'react-router-dom';

import Header from './component/layout/Header';
import Footer from './component/layout/Footer';
import MainPage from './pages/Main';
import CentralClubPage from './pages/CentralClub';
import SmallClubPage from './pages/SmallClub';
import DetailPage from './menu/detail';
import DetailPage from './pages/DetailPage';
import LoginPage from './pages/LoginPage';
import KakaoRedirection from './menu/login/component/kakaoRedirection';
import BranchSmall from './menu/small_club/branch/branch_small';
import KakaoRedirection from './component/login/kakaoRedirection';
import HashTagPage from './pages/HashTag';
import ReviewWrite from './menu/detail/review_write';
import Search from './menu/search/search';
import SearchPage from './pages/SearchPage';
import SummaryPage from './pages/Summary';
import BookMarkPage from './menu/bookmark';
import BranchCentralPage from './pages/BranchCentral';
import BranchSmallPage from './pages/BranchSmall';

function App() {
const isPc = useMediaQuery({
Expand All @@ -35,13 +33,12 @@ function App() {
{/* <Route path="/menu/central_club/detail_page/review_write" element={<ReviewWrite />} /> */}
<Route path="/small" element={<SmallClubPage />} />
<Route path="/clubs/:clubId" element={<DetailPage />} />
<Route path="/menu/detail/review_write" element={<ReviewWrite />} />
<Route path="/central/divisions" element={<BranchCentralPage />} />
<Route path="/login" element={<LoginPage />} />
<Route path="/v1/auths/oauth/kakao" element={<KakaoRedirection />} />
<Route path="/menu/small_club/branch/branch_small" element={<BranchSmall />} />
<Route path="/small/colleges" element={<BranchSmallPage />} />
<Route path="/hastag" element={<HashTagPage />} />
<Route path="/menu/search" element={<Search />} />
<Route path="/search" element={<SearchPage />} />
<Route path="/summary" element={<SummaryPage />} />
<Route path="/menu/bookmark" element={<BookMarkPage />} />
</Routes>
Expand All @@ -57,13 +54,12 @@ function App() {
<Route path="/central" element={<CentralClubPage />} />
<Route path="/small" element={<SmallClubPage />} />
<Route path="/clubs/:clubId" element={<DetailPage />} />
<Route path="/menu/detail/review_write" element={<ReviewWrite />} />
<Route path="/central/divisions" element={<BranchCentralPage />} />
<Route path="/login" element={<LoginPage />} />
<Route path="/v1/auths/oauth/kakao" element={<KakaoRedirection />} />
<Route path="/menu/small_club/branch/branch_small" element={<BranchSmall />} />
<Route path="/small/colleges" element={<BranchSmallPage />} />
<Route path="/hashtag" element={<HashTagPage />} />
<Route path="/menu/search" element={<Search />} />
<Route path="/search" element={<SearchPage />} />
<Route path="/summary" element={<SummaryPage />} />
<Route path="/menu/bookmark" element={<BookMarkPage />} />
</Routes>
Expand Down
2 changes: 1 addition & 1 deletion src/component/hashtag/HashTagClub.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import styles from '../branch/branchCentral.module.css';
import styles from '../centralClub/centralClub.module.css';
import { LinkItem } from '../branch/BranchCentral';

function HashTagClub({ clubId, imageUrl, clubName, introduction }) {
Expand Down
2 changes: 1 addition & 1 deletion src/component/hashtag/TagScroll.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import HashTag from './HashTag';

export default function TagScroll() {
return (
<div className="wrapper">
<div className="tagScroll_wrapper">
<div className="tags_wrapper">
<HashTag />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/component/hashtag/branchHashtag.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react';
import axios from 'axios';
import { useLocation } from 'react-router-dom';
import HashTagClub from './HashTagClub';
import styles from '../centralClub/centralClub.module.css';
import styles from '../branch/branchCentral.module.css';

function BranchHashTag() {
const [loading, setLoading] = useState(true);
Expand Down
4 changes: 2 additions & 2 deletions src/component/hashtag/tagScroll.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@media screen and (min-width: 769px) {
.wrapper {
.tagScroll_wrapper {
padding: 0% 16%;
padding-bottom: 3px;
width: 100%;
Expand Down Expand Up @@ -31,7 +31,7 @@
}

@media screen and (max-width: 769px) {
.wrapper {
.tagScroll_wrapper {
padding: 0% 10%;
padding-bottom: 3px;
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/component/layout/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default function Header() {
};

const handleSearch = () => {
navigate(`/menu/search?clubName=${searchTerm}`, { state: { clubName: searchTerm } });
navigate(`/search?clubName=${searchTerm}`, { state: { clubName: searchTerm } });
};

const enterKeyDown = (event) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import { useLocation } from 'react-router-dom';
import styles from './search.module.css';
import axios from 'axios';
import SearchClub from './component/searchClub';
import SearchClub from './searchClub';

function Search() {
const [loading, setLoading] = useState(true);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import styles from './searchClub.module.css';
import { LinkItem } from '../../../component/branch/BranchCentral';
import { LinkItem } from '../branch/BranchCentral';

//clubid페이지로 이동할 수 있게 수정 완료
function SearchClub({ clubId, clubName, introduction, imageUrl, division, department }) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { useEffect, useState } from 'react';
import styles from './branch_small.module.css';
import styles from './branchSmall.module.css';
import axios from 'axios';
import SmallClub from './component/smallClub';
import SmallClubProps from './SmallClubProps';
import { useLocation } from 'react-router-dom';

function BranchSmall() {
Expand Down Expand Up @@ -37,7 +37,7 @@ function BranchSmall() {
rows.push(
<div className={styles.container} key={i}>
{rowItems.map((club) => (
<SmallClub
<SmallClubProps
key={club.clubId}
clubId={club.clubId}
imageUrl={club.imageUrl}
Expand Down
2 changes: 1 addition & 1 deletion src/component/smallClub/SmallClub.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function SmallClub() {
const navigate = useNavigate();

const onClicked = (departmentValue) => {
navigate('/menu/small_club/branch/branch_small', { state: { department: departmentValue } });
navigate('/small/colleges', { state: { department: departmentValue } });
};

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
import styles from './smallClub.module.css';
import { LinkItem } from '../../../../component/branch/BranchCentral';
import styles from './smallClubProps.module.css';
import { LinkItem } from '../branch/BranchCentral';

//clubid페이지로 이동할 수 있게 수정 완료
function SmallClub({ clubId, clubName, introduction, imageUrl }) {
function SmallClubProps({ clubId, clubName, introduction, imageUrl }) {
return (
<div className={styles.rectangle}>
<LinkItem to={`/menu/detail/${clubId}`}>
<LinkItem to={`/clubs/${clubId}`}>
<img src={imageUrl} alt={clubName} className={styles.image} />

<h3 className={styles.title}>{clubName}</h3>
Expand All @@ -17,11 +17,11 @@ function SmallClub({ clubId, clubName, introduction, imageUrl }) {
);
}

SmallClub.propTypes = {
SmallClubProps.propTypes = {
clubId: PropTypes.number.isRequired,
imageUrl: PropTypes.string.isRequired,
clubName: PropTypes.string.isRequired,
introduction: PropTypes.string.isRequired,
};

export default SmallClub;
export default SmallClubProps;
File renamed without changes.
File renamed without changes.
65 changes: 0 additions & 65 deletions src/menu/detail/_component/IntroductionTab.jsx

This file was deleted.

58 changes: 0 additions & 58 deletions src/menu/detail/_component/ReviewBox.jsx

This file was deleted.

79 changes: 0 additions & 79 deletions src/menu/detail/_component/ReviewStatics.jsx

This file was deleted.

Loading

0 comments on commit fd896e2

Please sign in to comment.