From 1a3e6f688d59aedce2b71e1a97dabe863e357886 Mon Sep 17 00:00:00 2001 From: DmitriyB Date: Fri, 31 Mar 2023 13:17:02 +0500 Subject: [PATCH] deleted unused types --- .../components/popups/PopupExit/PopupExit.tsx | 2 - src/store/reducers/ActionCreator.ts | 2 +- src/store/reducers/languageSlice.ts | 1 + src/utils/connectData.tsx | 7 -- src/utils/types.tsx | 91 ------------------- src/utils/uiState.js | 28 ------ 6 files changed, 2 insertions(+), 129 deletions(-) delete mode 100644 src/utils/connectData.tsx delete mode 100644 src/utils/types.tsx delete mode 100644 src/utils/uiState.js diff --git a/src/components/pages/Stream/components/popups/PopupExit/PopupExit.tsx b/src/components/pages/Stream/components/popups/PopupExit/PopupExit.tsx index c9d0afd..670ef14 100644 --- a/src/components/pages/Stream/components/popups/PopupExit/PopupExit.tsx +++ b/src/components/pages/Stream/components/popups/PopupExit/PopupExit.tsx @@ -4,8 +4,6 @@ import "./PopupExit.css"; import { useTranslation } from "react-i18next"; -import { TSidebarPopup } from "utils/types"; - export const PopupExit: React.FC = ({ setClose, closeStream }) => { const { t } = useTranslation(); diff --git a/src/store/reducers/ActionCreator.ts b/src/store/reducers/ActionCreator.ts index 76e0d7c..47e8b27 100644 --- a/src/store/reducers/ActionCreator.ts +++ b/src/store/reducers/ActionCreator.ts @@ -2,7 +2,7 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; import axios from 'axios'; const instance = axios.create({ - baseURL: 'https://a1.test.coord.graff.tech', + baseURL: 'https://a1.coord.graff.tech', }); instance.defaults.headers.post['Content-Type'] = 'application/json'; diff --git a/src/store/reducers/languageSlice.ts b/src/store/reducers/languageSlice.ts index 778d7dd..7bae64e 100644 --- a/src/store/reducers/languageSlice.ts +++ b/src/store/reducers/languageSlice.ts @@ -27,6 +27,7 @@ i18next + interface LanguageState { currentLang: string; } diff --git a/src/utils/connectData.tsx b/src/utils/connectData.tsx deleted file mode 100644 index 10837fe..0000000 --- a/src/utils/connectData.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export const ConnectData = { - // pixelIp: "192.168.1.170", - pixelIp: 'stream.graff.tech', - // url: `http://192.168.1.170`, - url: `https://stream.graff.tech`, - port: 13001 -} \ No newline at end of file diff --git a/src/utils/types.tsx b/src/utils/types.tsx deleted file mode 100644 index 3199494..0000000 --- a/src/utils/types.tsx +++ /dev/null @@ -1,91 +0,0 @@ -export type TMain = { - code: any; - text: any; - onConnectSess: () => void; - setCode: (code: string) => void; - onConnectSessEx: (code: string) => void; -}; - -export type TObject = { - popup1: boolean; - popup2: boolean; -}; - -export type TPopup = { - visible: TObject; - text: any; - setVisible: (object: TObject) => void; - onConnectSess?: () => void; - onConnectSessEx?: (code: string) => void; - setCode?: (code: string) => void; -}; - -export type TData = { - port: string; - id: string; -}; - -export type TSideBar = { - currentUser: (user: any) => void - closeStream: () => void; - data: TData; - -} -export type TPlayerComponent = { - closeStream: () => void; - data: TData; -}; - -export type TUserList = { - handleReturnControl: () => void; - handleControl: (user: object) => void; - selected: any; - setSelected: (user: any) => void; - message: any; - localUser: any; - audio: any; - users: any; - sendControlRequest: (user: object) => void; -}; - -export type TUserButton = { - handleReturnControl: () => void; - handleControl: (user: object) => void; - setSelected: (user: any) => void; - message: any; - sendControlRequest: (user: object) => void; - audio: any; - user: any; - selected: boolean; - isAdmin: (user: object) => boolean; - localUser: any; -}; - -export type TUserControl = { - setMuted: (state: boolean) => void; - isMuted: boolean; - handleReturnControl: () => void; - setNotification: (state: boolean) => void; - handleControl: (user: object) => void; - localUser: any; - user: any; - isAdmin: (user: object) => boolean; - sendControlRequest: (user: object) => void; -}; - -export type TButton = { - button: any; - active?: boolean; - onClick: () => void; -}; - -export type THOC = { - onClick: () => void; - isMuted?: boolean; -}; - -export type TSidebarPopup = { - setClose: () => void; - data?: TData; - onExit?: () => void; -}; diff --git a/src/utils/uiState.js b/src/utils/uiState.js deleted file mode 100644 index 0eb7ab3..0000000 --- a/src/utils/uiState.js +++ /dev/null @@ -1,28 +0,0 @@ -import control from '../images/icons/control.svg' -import microOn from '../images/icons/MicroOn.svg' -import share from '../images/icons/Share.svg' - - - -export const buttons = [ - { - icon: control, - active: "Запрет управления", - inactive: "Запрос управления", - type: "control", - }, - - { - icon: microOn, - active: "Включить микрофон", - inactive: "Выключить микрофон", - type: "microphone", - }, - { - icon: share, - active: "Поделиться", - inactive: "Поделиться", - type: "share", - }, -]; -