diff --git a/src/assets/Icons/CopyIcon.tsx b/src/assets/Icons/CopyIcon.tsx index 67ede2d..6029cd8 100644 --- a/src/assets/Icons/CopyIcon.tsx +++ b/src/assets/Icons/CopyIcon.tsx @@ -1,10 +1,9 @@ import { useTheme } from '@mui/material'; -import React from 'react'; export const CopyIcon = ({ color, height = 11, width = 10 }) => { const theme = useTheme(); - const setColor = color ? color : theme.palette.text.primary; + return ( ); diff --git a/src/common/CustomLoader.tsx b/src/common/CustomLoader.tsx index d1ae3b2..84dbfac 100644 --- a/src/common/CustomLoader.tsx +++ b/src/common/CustomLoader.tsx @@ -1,6 +1,6 @@ -import React from 'react'; import './customloader.css'; import { Box, useTheme } from '@mui/material'; + export const CustomLoader = () => { const theme = useTheme(); return ( diff --git a/src/common/CustomSvg.tsx b/src/common/CustomSvg.tsx index c1d8f09..fc805a9 100644 --- a/src/common/CustomSvg.tsx +++ b/src/common/CustomSvg.tsx @@ -1,17 +1,14 @@ -import React from 'react'; - export const CustomSvg = ({ src, color = 'black', size = 24 }) => { - return ( - - ); - }; - \ No newline at end of file + return ( + + ); +}; diff --git a/src/common/customloader.css b/src/common/customloader.css index dd00558..c16d21d 100644 --- a/src/common/customloader.css +++ b/src/common/customloader.css @@ -36,6 +36,7 @@ left: 56px; animation: lds-ellipsis3 0.6s infinite; } + @keyframes lds-ellipsis1 { 0% { transform: scale(0); diff --git a/src/common/useFetchResources.tsx b/src/common/useFetchResources.tsx index 242f418..8e388a7 100644 --- a/src/common/useFetchResources.tsx +++ b/src/common/useFetchResources.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useRef } from 'react'; +import { useCallback } from 'react'; import { resourceDownloadControllerAtom } from '../atoms/global'; import { getBaseApiReact } from '../App'; import { useSetAtom } from 'jotai'; diff --git a/src/components/Apps/AppsCategoryDesktop.tsx b/src/components/Apps/AppsCategoryDesktop.tsx index 754ba85..39f12ee 100644 --- a/src/components/Apps/AppsCategoryDesktop.tsx +++ b/src/components/Apps/AppsCategoryDesktop.tsx @@ -56,7 +56,7 @@ export const AppsCategoryDesktop = ({ isShow, }) => { const [searchValue, setSearchValue] = useState(''); - const virtuosoRef = useRef(); + const virtuosoRef = useRef(null); const theme = useTheme(); const categoryList = useMemo(() => { diff --git a/src/components/Apps/AppsLibraryDesktop.tsx b/src/components/Apps/AppsLibraryDesktop.tsx index 3490e89..17b9b71 100644 --- a/src/components/Apps/AppsLibraryDesktop.tsx +++ b/src/components/Apps/AppsLibraryDesktop.tsx @@ -102,7 +102,7 @@ export const AppsLibraryDesktop = ({ getQapps, }) => { const [searchValue, setSearchValue] = useState(''); - const virtuosoRef = useRef(); + const virtuosoRef = useRef(null); const theme = useTheme(); const officialApps = useMemo(() => { diff --git a/src/components/Auth/DownloadWallet.tsx b/src/components/Auth/DownloadWallet.tsx index 838ea2c..cbf5e49 100644 --- a/src/components/Auth/DownloadWallet.tsx +++ b/src/components/Auth/DownloadWallet.tsx @@ -63,6 +63,7 @@ export const DownloadWallet = ({ wallet, qortAddress: rawWallet.address0, }); + return { wallet, qortAddress: rawWallet.address0, diff --git a/src/components/Chat/AnnouncementList.tsx b/src/components/Chat/AnnouncementList.tsx index 9c32cc1..5f3c75b 100644 --- a/src/components/Chat/AnnouncementList.tsx +++ b/src/components/Chat/AnnouncementList.tsx @@ -18,7 +18,7 @@ export const AnnouncementList = ({ loadMore, myName, }) => { - const listRef = useRef(); + const listRef = useRef(null); const [messages, setMessages] = useState(initialMessages); useEffect(() => { diff --git a/src/components/Chat/ChatList.tsx b/src/components/Chat/ChatList.tsx index 56acbc7..8362fad 100644 --- a/src/components/Chat/ChatList.tsx +++ b/src/components/Chat/ChatList.tsx @@ -23,7 +23,7 @@ export const ChatList = ({ hasSecretKey, isPrivate, }) => { - const parentRef = useRef(); + const parentRef = useRef(null); const [messages, setMessages] = useState(initialMessages); const [showScrollButton, setShowScrollButton] = useState(false); const [showScrollDownButton, setShowScrollDownButton] = useState(false); diff --git a/src/components/Chat/ChatOptions.tsx b/src/components/Chat/ChatOptions.tsx index 4f92f53..0ec1866 100644 --- a/src/components/Chat/ChatOptions.tsx +++ b/src/components/Chat/ChatOptions.tsx @@ -60,8 +60,8 @@ export const ChatOptions = ({ const [searchValue, setSearchValue] = useState(''); const [selectedMember, setSelectedMember] = useState(0); const theme = useTheme(); - const parentRef = useRef(); - const parentRefMentions = useRef(); + const parentRef = useRef(null); + const parentRefMentions = useRef(null); const [lastMentionTimestamp, setLastMentionTimestamp] = useState(null); const [debouncedValue, setDebouncedValue] = useState(''); // Debounced value const messages = useMemo(() => { diff --git a/src/components/Chat/GroupAnnouncements.tsx b/src/components/Chat/GroupAnnouncements.tsx index 9ac3ded..c91bfaa 100644 --- a/src/components/Chat/GroupAnnouncements.tsx +++ b/src/components/Chat/GroupAnnouncements.tsx @@ -31,6 +31,7 @@ import { import { RequestQueueWithPromise } from '../../utils/queue/queue'; import { CustomizedSnackbars } from '../Snackbar/Snackbar'; import { addDataPublishesFunc, getDataPublishesFunc } from '../Group/Group'; +import { useTranslation } from 'react-i18next'; const uid = new ShortUniqueId({ length: 8 }); @@ -101,6 +102,7 @@ export const decryptPublishes = async (encryptedMessages: any[], secretKey) => { console.log(error); } }; + export const handleUnencryptedPublishes = (publishes) => { let publishesData = []; publishes.forEach((pub) => { @@ -149,6 +151,7 @@ export const GroupAnnouncements = ({ editorRef.current = editorInstance; }; const [, forceUpdate] = React.useReducer((x) => x + 1, 0); + const { t } = useTranslation(['core', 'group']); const triggerRerender = () => { forceUpdate(); // Trigger re-render by updating the state @@ -209,7 +212,6 @@ export const GroupAnnouncements = ({ ) return; setIsLoading(true); - // initWebsocketMessageGroup() hasInitializedWebsocket.current = true; }, [secretKey, isPrivate]); @@ -287,7 +289,10 @@ export const GroupAnnouncements = ({ const fee = await getFee('ARBITRARY'); await show({ - message: 'Would you like to perform a ARBITRARY transaction?', + message: t('group:question.perform_transaction', { + action: 'ARBITRARY', + postProcess: 'capitalize', + }), publishFee: fee.fee + ' QORT', }); @@ -329,7 +334,7 @@ export const GroupAnnouncements = ({ setTempData(selectedGroup); clearEditorContent(); } - // send chat message + // TODO send chat message } catch (error) { if (!error) return; setInfoSnack({ diff --git a/src/components/CoreSyncStatus.tsx b/src/components/CoreSyncStatus.tsx index 06d30de..79e22d2 100644 --- a/src/components/CoreSyncStatus.tsx +++ b/src/components/CoreSyncStatus.tsx @@ -114,7 +114,7 @@ export const CoreSyncStatus = () => {
{t('group:ban_list', { postProcess: 'capitalize' })}
Invitees list
++ {t('group:invitees_list', { + postProcess: 'capitalize', + })} +
Join request list
+{t('core:list.join_request', { postProcess: 'capitalize' })}
Member list
++ {t('core:list.member', { + postProcess: 'capitalize', + })} +
Invite list
++ {t('core:list.invite', { + postProcess: 'capitalize', + })} +
+