Skip to content

Commit

Permalink
chore: rename internal state and setter function
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarajohn committed Mar 13, 2024
1 parent 5b9ffe5 commit 886aae2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/providers/ContentLoadingIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { ContentLoadingIndicatorContext } from '../contexts/content-loading-indi

export function ContentLoadingIndicator(props: { children: ReactNode }) {
const { children } = props;
const [loadingIndicatorActive, setLoadingIndicatorActive] = useState<boolean>(false);
const [loadingIndicator, setLoadingIndicator] = useState<boolean>(false);

return (
<ContentLoadingIndicatorContext.Provider
value={{
loadingIndicatorActive,
setLoadingIndicatorActive,
loadingIndicator,
setLoadingIndicator,
}}
>
{children}
Expand Down
6 changes: 3 additions & 3 deletions src/ui/Scaffold/Scaffold.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { type ReactElement, type ReactNode } from 'react';
import { _useContentLoadingIndicator } from '../../hooks/useContentLoadingIndicator';
import { ContentLoadingIndicator } from '../../providers/ContentLoadingIndicator';
import {
backGround,
Contents,
GridContainer,
Header,
LoadingBarWrapper,
SideNav,
backGround,
} from './Scaffold.styles';

export type ScaffoldProps = {
Expand All @@ -20,7 +20,7 @@ export type ScaffoldProps = {

function ScaffoldInternal(props: ScaffoldProps) {
const { navigationSlot, headerSlot, children } = props;
const { loadingIndicatorActive } = _useContentLoadingIndicator();
const { loadingIndicator } = _useContentLoadingIndicator();

const theme = useTheme();

Expand All @@ -29,7 +29,7 @@ function ScaffoldInternal(props: ScaffoldProps) {
<Global styles={{ body: backGround(theme) }} />
<SideNav>{navigationSlot}</SideNav>
<Header>
{loadingIndicatorActive ? (
{loadingIndicator ? (
<LoadingBarWrapper>
<Loader type={'indeterminate'} />
</LoadingBarWrapper>
Expand Down

0 comments on commit 886aae2

Please sign in to comment.