fix: undefined in mii list api url
This commit is contained in:
parent
6ce3daadf5
commit
bc863b570e
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ const fetcher = (url: string) => fetch(url).then((res) => res.json());
|
||||||
|
|
||||||
export default function MiiList({ isLoggedIn, userId, sessionUserId }: Props) {
|
export default function MiiList({ isLoggedIn, userId, sessionUserId }: Props) {
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
const { data, error } = useSWR<ApiResponse>(`/api/mii/list?${searchParams.toString()}${userId && `&userId=${userId}`}`, fetcher);
|
const { data, error } = useSWR<ApiResponse>(`/api/mii/list?${searchParams.toString()}${userId ? `&userId=${userId}` : ""}`, fetcher);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue