Skip to content

Commit

Permalink
Added loading animation for search
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinvanschoren committed Jan 8, 2024
1 parent 5705779 commit b8ab08f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 3 additions & 6 deletions app/src/components/Loader.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
import React from "react";
import styled from "@emotion/styled";
import { CircularProgress } from "@mui/material";
import { LinearProgress } from "@mui/material";

const Root = styled.div`
justify-content: center;
align-items: center;
display: flex;
min-height: 100%;
`;

function Loader() {
export default function Loader() {
return (
<Root>
<CircularProgress color="secondary" />
<LinearProgress />
</Root>
);
}

export default Loader;
4 changes: 4 additions & 0 deletions app/src/components/search/SearchContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Tab,
Tabs,
Card,
LinearProgress,
} from "@mui/material";

import { TabContext, TabPanel } from "@mui/lab";
Expand Down Expand Up @@ -206,6 +207,9 @@ const SearchContainer = memo(

return (
<SearchProvider config={config}>
<WithSearch mapContextToProps={({ isLoading }) => ({ isLoading })}>
{({ isLoading }) => (isLoading ? <LinearProgress /> : null)}
</WithSearch>
{false && <TagFilter />}
<TabContext value={filter}>
<FilterBox xs={12} variant="outlined">
Expand Down

0 comments on commit b8ab08f

Please sign in to comment.