Skip to content

Commit

Permalink
Feat: 메인페이지 상단에 info 띄우기
Browse files Browse the repository at this point in the history
  • Loading branch information
SayisMe committed Jun 28, 2023
1 parent 4de4772 commit e415ee7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ import { useEffect, useState } from "react";
export const UserList = () => {
const isSmall = useMediaQuery((theme) => theme.breakpoints.down("sm"));
const [userList, setUserList] = useState([]);
const [info, setInfo] = useState(null);
const [selectedUser, setSelectedUser] = useState(null);
const [refresh, setRefresh] = useState(false);

useEffect(() => {
fetch("http://3.38.118.228:8080/api/userStampCount")
.then((response) => response.json())
.then((data) => {
setUserList(data.data)
setUserList(data.data);
setInfo(data.info);
// console.log(data[0].kakaoId);
});
}, []);
Expand Down Expand Up @@ -54,6 +56,10 @@ export const UserList = () => {

return (
<div>
<h2 style={{
margin: '30px 0px 0px 20px'
}}>{info}</h2>

{!selectedUser && (
<List>
{isSmall ? (
Expand Down

0 comments on commit e415ee7

Please sign in to comment.