Skip to content

Commit

Permalink
Move to notistack
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaboleken committed Jan 1, 2025
1 parent 5579bc8 commit f9ba968
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"jest-websocket-mock": "^2.5.0",
"lodash": "^4.17.21",
"nanoid": "^5.0.9",
"notistack-v2-maintained": "^2.1.0",
"notistack": "^3.0.1",
"react": "^19.0.0",
"react-device-detect": "^2.2.3",
"react-dom": "^19.0.0",
Expand Down
2 changes: 1 addition & 1 deletion react/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "./App.css";
import {CssBaseline, ThemeProvider} from "@mui/material";
import theme from "./styles/theme";
import React from "react";
import {SnackbarProvider} from "notistack-v2-maintained";
import {SnackbarProvider} from 'notistack';
import AntSnackBar from "Components/AntSnackBar";
import {initReactI18next} from "react-i18next";
import i18n from "i18next";
Expand Down
2 changes: 1 addition & 1 deletion react/src/Components/AntSnackBar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {forwardRef, useCallback} from 'react';
import {SnackbarContent, useSnackbar} from 'notistack-v2-maintained';
import {SnackbarContent, useSnackbar} from 'notistack';
import {styled} from '@mui/material/styles';
import {Grid, Typography, useTheme} from '@mui/material';
import {SvgIcon} from './SvgIcon';
Expand Down
2 changes: 1 addition & 1 deletion react/src/Components/EffectsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Stack from "@mui/material/Stack";
import Grid from "@mui/material/Grid";
import { SvgIcon } from "./SvgIcon";
import {useTheme} from "@mui/material";
import {useSnackbar} from "notistack-v2-maintained";
import {useSnackbar} from 'notistack';
import {useTranslation} from "react-i18next";
import {CustomizedBtn} from "./CustomizedBtn";

Expand Down
2 changes: 1 addition & 1 deletion react/src/Components/Footer/Components/CameraButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { styled, useTheme } from "@mui/material/styles";
import { SvgIcon } from "../../SvgIcon";
import { Tooltip } from "@mui/material";
import { useTranslation } from "react-i18next";
import { useSnackbar } from "notistack-v2-maintained";
import { useSnackbar } from 'notistack';
import {CustomizedBtn} from "../../CustomizedBtn";

function CameraButton(props) {
Expand Down
2 changes: 1 addition & 1 deletion react/src/Components/Footer/Components/InfoButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import MenuItem from '@mui/material/MenuItem';
import Typography from '@mui/material/Typography';
import { ListItemIcon, ListItemText, Tooltip } from '@mui/material';
import { useTranslation } from 'react-i18next';
import { useSnackbar } from 'notistack-v2-maintained';
import { useSnackbar } from 'notistack';

const StyledListItemText = styled(ListItemText)(({ theme }) => ({
'& .MuiListItemText-primary': {
Expand Down
2 changes: 1 addition & 1 deletion react/src/Components/Footer/Components/MicButton.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { SvgIcon } from '../../SvgIcon';
import { useSnackbar } from 'notistack-v2-maintained';
import { useSnackbar } from 'notistack';
import { Tooltip } from '@mui/material';
import { useTheme } from '@mui/material/styles';
import { useTranslation } from 'react-i18next';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import React from 'react';
import { render } from '@testing-library/react';
import { ConferenceContext } from 'pages/AntMedia';
import CameraButton from 'Components/Footer/Components/CameraButton';
import {useSnackbar} from "notistack-v2-maintained";
import {useSnackbar} from 'notistack';

jest.mock('notistack-v2-maintained', () => ({
...jest.requireActual('notistack-v2-maintained'),
jest.mock('notistack', () => ({
...jest.requireActual('notistack'),
useSnackbar: jest.fn(),
SnackbarProvider: ({ children }) => <div></div>,
}));
Expand Down
6 changes: 3 additions & 3 deletions react/src/__tests__/pages/AntMedia.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import { render, act, waitFor, screen } from '@testing-library/react';
import AntMedia from 'pages/AntMedia';
import { useWebSocket } from 'Components/WebSocketProvider';
import { useSnackbar} from "notistack-v2-maintained";
import { useSnackbar} from 'notistack';
import { UnitTestContext } from "pages/AntMedia";
import { ThemeProvider } from '@mui/material/styles';
import {ThemeList} from "styles/themeList";
Expand All @@ -21,8 +21,8 @@ jest.mock('Components/WebSocketProvider', () => ({
useWebSocket: jest.fn(),
}));

jest.mock('notistack-v2-maintained', () => ({
...jest.requireActual('notistack-v2-maintained'),
jest.mock('notistack', () => ({
...jest.requireActual('notistack'),
useSnackbar: jest.fn(),
SnackbarProvider: ({ children }) => <div></div>,
}));
Expand Down
2 changes: 1 addition & 1 deletion react/src/pages/AntMedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import WaitingRoom from "./WaitingRoom";
import _ from "lodash";
import MeetingRoom from "./MeetingRoom";
import MessageDrawer from "Components/MessageDrawer";
import {useSnackbar} from "notistack-v2-maintained";
import {useSnackbar} from 'notistack';
import LeftTheRoom from "./LeftTheRoom";
import {getUrlParameter, VideoEffect, WebRTCAdaptor} from "@antmedia/webrtc_adaptor";
import {SvgIcon} from "../Components/SvgIcon";
Expand Down
2 changes: 1 addition & 1 deletion react/src/pages/WaitingRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import SettingsDialog from "Components/Footer/Components/SettingsDialog";
import {CustomizedBtn} from "Components/CustomizedBtn";

import {SvgIcon} from "Components/SvgIcon";
import {useSnackbar} from "notistack-v2-maintained";
import {useSnackbar} from 'notistack';
import {getUrlParameter} from "@antmedia/webrtc_adaptor";
import {getRootAttribute, isComponentMode} from "utils";
import {useTheme} from "@mui/material/styles";
Expand Down

0 comments on commit f9ba968

Please sign in to comment.