import React, { useEffect, MouseEvent } from "react"; import { BrowserRouter, Route, Routes, Link, Outlet, useSearchParams } from "react-router-dom"; import Theme from "./theme"; import getUrl from "../url" const initSearchParams = { "theme": "1", "city": "1" } export default function Body() { const [searchParams, setSearchParams] = useSearchParams(initSearchParams) useEffect(() => { console.log(searchParams.get('theme'), searchParams.get('city')) setSearchParams(searchParams) }, []) const handleClick = (event: MouseEvent) => { console.log(`theme id= ${event.currentTarget.id}`) } let url = getUrl(); return (
{/* citylist */}
{url.map(url => (
{url.url}
))} {/* pic */}
// Body Page ); };