diff --git a/src/api/index.ts b/src/api/index.ts index 45866bd..7c676f5 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,6 +1,20 @@ import axios from 'axios'; -const api = axios.create({ baseURL: 'https://wayu.hackathon.sparcs.net/' }); +const api = axios.create({ + baseURL: 'https://wayu.hackathon.sparcs.net/', + paramsSerializer: (params) => { + const searchParams = new URLSearchParams(); + for (const key of Object.keys(params)) { + const param = params[key]; + if (Array.isArray(param)) { + searchParams.append(key, param.join(',')); + } else { + searchParams.append(key, param); + } + } + return searchParams.toString(); + }, +}); api.interceptors.request.use((config) => { const token = localStorage.getItem('accessToken'); diff --git a/src/pages/Videos.tsx b/src/pages/Videos.tsx index d9ea300..cbd7ebf 100644 --- a/src/pages/Videos.tsx +++ b/src/pages/Videos.tsx @@ -1,13 +1,12 @@ -import React from 'react'; +import { Swiper, SwiperSlide } from 'swiper/react'; +import 'swiper/css'; import Header from './component/Header'; -import { FaLocationArrow } from "react-icons/fa"; -import { Link } from 'react-router-dom'; -import Category from './component/Category'; -import Grade from './component/Grade'; -import Feel from './component/Feel'; -import Reviews from './component/Reviews'; import Menu from './component/Menu'; import Video from './component/Video'; +import { useNavigate, useParams } from 'react-router-dom'; +import { useQuery } from '@tanstack/react-query'; +import api from '../api'; +import { useEffect, useState } from 'react'; // type VideosProps = { // type: string; // profileImg: string; @@ -16,19 +15,46 @@ import Video from './component/Video'; // videoImg?: string; // followChk?: boolean; // videoUrl: string; -// Categorys: string[]; +// Categorys: string[]; // } export default function Videos() { - return ( -
지도
= ({ src, grade, name }) => { - const [isPlaying, setIsPlaying] = useState1235
+{likes}
__A___D___
+{user.nickname}
- 유성구 둔산동 백년식당 -
+{place.name}