mirror of
https://github.com/Ategon/Jamjar.git
synced 2025-02-12 06:16:21 +00:00
Comment out unused user code
This commit is contained in:
parent
206b528075
commit
ee77d40b92
1 changed files with 23 additions and 23 deletions
|
@ -1,30 +1,30 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useEffect, useState } from "react";
|
// import { useEffect, useState } from "react";
|
||||||
import { useParams } from "next/navigation";
|
// import { useParams } from "next/navigation";
|
||||||
|
|
||||||
export default function User() {
|
export default function User() {
|
||||||
const [user, setUser] = useState();
|
// const [user, setUser] = useState();
|
||||||
const { slug } = useParams();
|
// const { slug } = useParams();
|
||||||
|
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
const fetchUser = async () => {
|
// const fetchUser = async () => {
|
||||||
const response = await fetch(`http://localhost:3005/api/v1/user?slug=${slug}`)
|
// const response = await fetch(`http://localhost:3005/api/v1/user?slug=${slug}`)
|
||||||
setUser(await response.json());
|
// setUser(await response.json());
|
||||||
}
|
// }
|
||||||
|
|
||||||
fetchUser();
|
// fetchUser();
|
||||||
}, [])
|
// }, [])
|
||||||
|
|
||||||
return (
|
// return (
|
||||||
<div>
|
// <div>
|
||||||
{user && (
|
// {user && (
|
||||||
<div>
|
// <div>
|
||||||
<p>{user.name}</p>
|
// <p>{user.name}</p>
|
||||||
<p>{user.bio}</p>
|
// <p>{user.bio}</p>
|
||||||
</div>
|
// </div>
|
||||||
)}
|
// )}
|
||||||
</div>
|
// </div>
|
||||||
);
|
// );
|
||||||
}
|
return <div></div>;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue