Skip to content

Commit 812b23f

Browse files
committed
allow
1 parent 45d2b55 commit 812b23f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/context/mentorsContext/MentorsContext.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
} from '../../favoriteManager';
1818
import { useFilters } from '../../context/filtersContext/FiltersContext';
1919
import { mockMentors } from './mockMentors';
20+
import { isDeep } from '../../utils/isDeep';
2021

2122
const initialState = {
2223
favorites: [],
@@ -75,7 +76,7 @@ export const MentorsProvider = (props) => {
7576
}, [currentUser, api]);
7677

7778
useEffect(() => {
78-
// initialize();
79+
isDeep() && initialize();
7980
}, [initialize]);
8081

8182
const [filters] = useFilters();

src/utils/isDeep.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { isSsr } from '../helpers/ssr';
2-
31
export const isDeep = () => {
42
if (typeof window === 'undefined') {
53
return false;

0 commit comments

Comments
 (0)