Set new loader centered position

This commit is contained in:
jeffvli
2022-02-07 13:47:29 -08:00
parent 3b81174328
commit 69887f5e4e
4 changed files with 5 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ import {
SidebarNavItem,
} from './styled';
import { StyledButton } from '../shared/styled';
import { InfoModal } from '../modal/PageModal';
import { InfoModal } from '../modal/Modal';
import placeholderImg from '../../img/placeholder.png';
import SidebarPlaylists from './SidebarPlaylists';
import { setSidebar } from '../../redux/configSlice';

View File

@@ -52,7 +52,7 @@ const SidebarPlaylists = ({ width }: any) => {
{({ height }: any) => (
<>
{isLoading ? (
<CenterLoader />
<CenterLoader absolute />
) : (
<List
height={height - 25}

View File

@@ -1,10 +1,10 @@
import React from 'react';
import { Loader } from 'rsuite';
const CenterLoader = () => {
const CenterLoader = ({ absolute }: any) => {
return (
<div style={{ height: '100%' }}>
<Loader style={{ top: '50%', left: '50%', position: 'absolute' }} />
<Loader style={{ top: '50%', left: '50%', position: absolute ? 'absolute' : 'relative' }} />
</div>
);
};

View File

@@ -220,7 +220,7 @@ const GridViewType = ({
gridRef={gridRef}
/>
) : loading ? (
<CenterLoader />
<CenterLoader absolute />
) : (
<></>
)}