Skip to content

Commit

Permalink
Client: remove useless set loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
TimofeyBoyko committed Dec 12, 2024
1 parent 799f17e commit 490ea59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
12 changes: 1 addition & 11 deletions packages/client/src/Client.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,11 @@ import {
import ArticleWrapper from "./components/ArticleWrapper";

const ClientArticle = React.memo(
({
withMainButton,
setIsHeaderLoading,
setIsFilterLoading,
showArticleLoader,
isInfoPanelVisible,
}) => {
({ withMainButton, showArticleLoader, isInfoPanelVisible }) => {
return (
<ArticleWrapper
isInfoPanelVisible={isInfoPanelVisible}
withMainButton={withMainButton}
onLogoClickAction={() => {
setIsFilterLoading(true, false);
setIsHeaderLoading(true, false);
}}
showArticleLoader={showArticleLoader}
>
<Article.Header>
Expand Down
4 changes: 3 additions & 1 deletion packages/client/src/pages/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ const PureHome = (props) => {

const setIsLoading = React.useCallback(
(param, withoutTimer, withHeaderLoader) => {
if (withHeaderLoader) setIsSectionHeaderLoading(param, !withoutTimer);
if (withHeaderLoader)
return setIsSectionHeaderLoading(param, !withoutTimer);

setIsSectionBodyLoading(param, !withoutTimer);
},
[setIsSectionHeaderLoading, setIsSectionBodyLoading],
Expand Down

0 comments on commit 490ea59

Please sign in to comment.