Comment out unused user code

This commit is contained in:
Ategon 2025-01-14 17:50:16 -05:00
parent 206b528075
commit ee77d40b92

View file

@ -1,30 +1,30 @@
"use client";
import { useEffect, useState } from "react";
import { useParams } from "next/navigation";
// import { useEffect, useState } from "react";
// import { useParams } from "next/navigation";
export default function User() {
const [user, setUser] = useState();
const { slug } = useParams();
// const [user, setUser] = useState();
// const { slug } = useParams();
useEffect(() => {
const fetchUser = async () => {
const response = await fetch(`http://localhost:3005/api/v1/user?slug=${slug}`)
setUser(await response.json());
}
// useEffect(() => {
// const fetchUser = async () => {
// const response = await fetch(`http://localhost:3005/api/v1/user?slug=${slug}`)
// setUser(await response.json());
// }
fetchUser();
}, [])
// fetchUser();
// }, [])
return (
<div>
{user && (
<div>
<p>{user.name}</p>
<p>{user.bio}</p>
</div>
)}
</div>
);
}
// return (
// <div>
// {user && (
// <div>
// <p>{user.name}</p>
// <p>{user.bio}</p>
// </div>
// )}
// </div>
// );
return <div></div>;
}