Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
metastasio committed Oct 6, 2023
1 parent dbf7272 commit a57c4a2
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion frontend/src/components/Modals/ModalRenameChannel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useTranslation } from 'react-i18next';
import * as yup from 'yup';
import * as leoProfanity from 'leo-profanity';

// import { handleEmit } from '../../socket';
import { closeModal, showToast } from '../../store/modal.slice';
import { selectModal, selectChatContent } from '../../services/stateSelectors';
import { SocketContext } from '../../context';
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/context.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import React from 'react';

// const URL = process.env.NODE_ENV === 'production' ? undefined : 'http://localhost:5001';

// const socket = io(URL, {
// autoConnect: false,
// });

const SocketContext = React.createContext();
const AuthContext = React.createContext();

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { io } from 'socket.io-client';
import store from './store';
import resources from './services/locales/index.js';
import App from './App.js';
import { AuthContext, SocketContext } from './context.js';
import { SocketContext } from './context.js';

const URL = process.env.NODE_ENV === 'production' ? undefined : 'http://localhost:5001';
const socket = io(URL, {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/services/stateSelectors.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const selectChatContent = (state) => state.content;
const selectAccess = (state) => state.content;
const selectAccess = (state) => state.authorization;
const selectModal = (state) => state.modal;
const selectToastContent = (state) => state.modal.toast;

Expand Down

0 comments on commit a57c4a2

Please sign in to comment.