-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add loading animation #232
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from "react"; | ||
import { Box } from "@mui/material"; | ||
import CircularProgress from "@mui/material/CircularProgress"; | ||
|
||
const Loader = () => { | ||
return ( | ||
<Box | ||
sx={{ | ||
width: "100%", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this |
||
textAlign: "center", | ||
py: 10, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please when replacing the |
||
m: 0, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it needed to override the margins to 0? |
||
}} | ||
> | ||
<CircularProgress /> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default Loader; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ import DeleteOutlineIcon from "@mui/icons-material/DeleteOutline"; | |
import ISO6391 from "iso-639-1"; | ||
import { ENTER_KEYCODE } from "../../constants"; | ||
import { greyHexCode } from "../../constants"; | ||
import Loader from "../../components/Loader"; | ||
|
||
const ListEntryChildren = ({ url, urlPrefix, setUpdateNodeChildren }) => { | ||
const [relations, setRelations] = useState(null); | ||
|
@@ -86,11 +87,7 @@ const ListEntryChildren = ({ url, urlPrefix, setUpdateNodeChildren }) => { | |
); | ||
} | ||
if (isPending) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nobeeakon I am taking this PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Piv94165 let's keep it simple ! Spinners are not the main UX blocker right now ;-) |
||
return ( | ||
<Typography sx={{ ml: 4 }} variant="h5"> | ||
Loading.. | ||
</Typography> | ||
); | ||
return <Loader />; | ||
} | ||
return ( | ||
<Box> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is ok to replace the 'loading...' message with a spinner. But for the moment I'd say we could just use the
CircularProgress
directly, without the need for a wrapper, this gives us more control on the spacing, size, etc. Please instead of importing this component, use theCircularProgress
.