Skip to content

Commit

Permalink
#14 feat : show laoding bar when not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
luckylooky2 committed Mar 19, 2023
1 parent 2afe91f commit 7962d43
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion front/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import NavBar from "components/common/NavBar";
import { Box } from "@mui/material";
import UserService from "api/UserService";
import { useDispatch } from "react-redux";
import { useEffect } from "react";

const App = (): JSX.Element => {
const dispatch = useDispatch();
Expand All @@ -26,7 +27,9 @@ const App = (): JSX.Element => {
}
};

loadUserData();
useEffect(() => {
loadUserData();
}, []);

return (
<Box className="full">
Expand Down
5 changes: 4 additions & 1 deletion front/src/components/party/PartyDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import KeyboardArrowLeftIcon from "@mui/icons-material/KeyboardArrowLeft";
import PartyService from "api/PartyService";
import { useLocation } from "react-router-dom";
import { useSelector } from "react-redux";
import Loading from "components/common/Loading";

// TODO : type을 관리하는 파일에 모아서 관리하기 + naming
export type PartyDetailInfo = {
Expand Down Expand Up @@ -119,7 +120,9 @@ const PartyDetail = (): JSX.Element => {
<Box sx={{ marginY: 1, height: "30%" }}>
<Typography sx={{ fontSize: "20px" }}>{detail.content}</Typography>
</Box>
{isCheck ? (
{detail.writer === "" ? (
<Loading />
) : isCheck ? (
<Button
variant="contained"
color="error"
Expand Down

0 comments on commit 7962d43

Please sign in to comment.