Skip to content

Commit

Permalink
Merge pull request #74 from DenysShchypt/bug/fix-versel
Browse files Browse the repository at this point in the history
remuve useRef for versel
  • Loading branch information
DenysShchypt authored Aug 15, 2024
2 parents 69f11ca + 9fbb43a commit 326c547
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
11 changes: 5 additions & 6 deletions client/src/components/TopBar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { FC, useEffect, useRef } from 'react';
import { FC, useEffect} from 'react';
import { Grid, Toolbar, Typography, useTheme } from '@mui/material';
import { MenuOutlined } from '@mui/icons-material';

import { AppBarStyled } from './styles';
import { ITopBarProps } from '../../common/types/topBar';
import { FlexBetween } from '../GeneralComponentsStyles';
Expand All @@ -22,14 +21,14 @@ const TopBarComponent: FC<ITopBarProps> = (
const userVerify: string = useAppSelector(
state => state.auth.user.verifyLink,
);
const effectRan = useRef(false);
// const effectRan = useRef(false);
useEffect(() => {
if (effectRan.current) {
// if (effectRan.current) {
if (userVerify==='') {
dispatch(refreshUsers());
}
}
effectRan.current = true;
// }
// effectRan.current = true;
}, [firstNameUserAuth,dispatch]);
return (
<AppBarStyled theme={theme}>
Expand Down
1 change: 0 additions & 1 deletion client/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { resolve } from 'path';

// https://vitejs.dev/config/
export default defineConfig({
Expand Down

0 comments on commit 326c547

Please sign in to comment.