List all namespaces in useTranslation

This commit is contained in:
Nicola Benaglia 2025-05-24 12:14:06 +02:00
parent a996015b20
commit ed3a9350ea
75 changed files with 574 additions and 82 deletions

View File

@ -308,7 +308,13 @@ function App() {
const [isLoading, setIsLoading] = useState<boolean>(false);
const [isLoadingSendCoin, setIsLoadingSendCoin] = useState<boolean>(false);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const theme = useTheme();
const [

View File

@ -53,7 +53,13 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
const [isOpenSeedModal, setIsOpenSeedModal] = useState(false);
const [isLoadingEncryptSeed, setIsLoadingEncryptSeed] = useState(false);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const { isShow, onCancel, onOk, show } = useModal();
const { getRootProps, getInputProps } = useDropzone({
@ -461,7 +467,13 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
const [note, setNote] = useState('');
const [isEdit, setIsEdit] = useState(false);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
useEffect(() => {
if (wallet?.name) {

View File

@ -37,7 +37,13 @@ export const AppInfo = ({ app, myName }) => {
);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const isSelectedAppPinned = !!sortablePinnedApps?.find(
(item) => item?.name === app?.name && item?.service === app?.service

View File

@ -42,7 +42,13 @@ export const AppInfoSnippet = ({
);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
return (
<AppInfoSnippetContainer

View File

@ -69,7 +69,13 @@ export const AppPublish = ({ categories, myAddress, myName }) => {
const [file, setFile] = useState(null);
const { show } = useContext(QORTAL_APP_CONTEXT);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [tag1, setTag1] = useState('');
const [tag2, setTag2] = useState('');
const [tag3, setTag3] = useState('');

View File

@ -20,7 +20,13 @@ export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
const [openSnack, setOpenSnack] = useState(false);
const [infoSnack, setInfoSnack] = useState(null);
const hasCalledRef = useRef(false);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const getRating = useCallback(async (name, service) => {
try {

View File

@ -45,7 +45,13 @@ export const AppsCategoryDesktop = ({
const [searchValue, setSearchValue] = useState('');
const virtuosoRef = useRef(null);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const categoryList = useMemo(() => {
if (category?.id === 'all') return availableQapps;

View File

@ -51,7 +51,13 @@ export const AppsDesktop = ({
const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom);
const { showTutorial } = useContext(QORTAL_APP_CONTEXT);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const myApp = useMemo(() => {
return availableQapps.find(

View File

@ -47,7 +47,13 @@ export const AppsDevMode = ({
const [categories, setCategories] = useState([]);
const iframeRefs = useRef({});
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
useEffect(() => {
setTimeout(() => {

View File

@ -41,7 +41,13 @@ export const AppsDevModeHome = ({
const [domain, setDomain] = useState('127.0.0.1');
const [port, setPort] = useState('');
const [selectedPreviewFile, setSelectedPreviewFile] = useState(null);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const { isShow, onCancel, onOk, show, message } = useModal();
const {
openSnackGlobal,

View File

@ -28,7 +28,13 @@ export const AppsHomeDesktop = ({
}) => {
const [qortalUrl, setQortalUrl] = useState('');
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const openQortalUrl = () => {
try {

View File

@ -105,7 +105,13 @@ export const AppsLibraryDesktop = ({
const [searchValue, setSearchValue] = useState('');
const virtuosoRef = useRef(null);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const officialApps = useMemo(() => {
return availableQapps.filter(

View File

@ -76,7 +76,13 @@ export const AppsNavBarDesktop = ({ disableBack }) => {
);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [isNewTabWindow, setIsNewTabWindow] = useState(false);
const tabsRef = useRef(null);
const [anchorEl, setAnchorEl] = useState(null);

View File

@ -73,7 +73,13 @@ export const AppsPrivate = ({ myName, myAddress }) => {
const [memberGroups] = useAtom(memberGroupsAtom);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const myGroupsPrivate = useMemo(() => {
return memberGroups?.filter(

View File

@ -27,7 +27,13 @@ import { useTranslation } from 'react-i18next';
export const BuyQortInformation = ({ balance }) => {
const [isOpen, setIsOpen] = useState(false);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const openBuyQortInfoFunc = useCallback(
(e) => {

View File

@ -19,7 +19,13 @@ export const AdminSpace = ({
isOwner,
}) => {
const [isMoved, setIsMoved] = useState(false);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
useEffect(() => {
if (hide) {

View File

@ -74,7 +74,13 @@ export const AdminSpaceInner = ({
const [isLoadingPublishKey, setIsLoadingPublishKey] = useState(false);
const { show, setInfoSnackCustom, setOpenSnackGlobal } =
useContext(QORTAL_APP_CONTEXT);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const getAdminGroupSecretKey = useCallback(async () => {
try {

View File

@ -40,7 +40,13 @@ export const AnnouncementDiscussion = ({
isPrivate,
}) => {
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [isSending, setIsSending] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const [isFocusedParent, setIsFocusedParent] = useState(false);

View File

@ -18,7 +18,13 @@ export const AnnouncementItem = ({
myName,
}) => {
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [commentLength, setCommentLength] = useState(0);
const getNumberOfComments = useCallback(async () => {

View File

@ -20,7 +20,13 @@ export const AnnouncementList = ({
myName,
}) => {
const [messages, setMessages] = useState(initialMessages);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
useEffect(() => {
cache.clearAll();

View File

@ -42,7 +42,13 @@ export const ChatDirect = ({
setMobileViewModeKeepOpen,
}) => {
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const { queueChats, addToQueue, processWithNewMessages } = useMessageQueue();
const [isFocusedParent, setIsFocusedParent] = useState(false);
const [onEditMessage, setOnEditMessage] = useState(null);

View File

@ -96,7 +96,13 @@ export const ChatGroup = ({
const [, forceUpdate] = useReducer((x) => x + 1, 0);
const lastReadTimestamp = useRef(null);
const handleUpdateRef = useRef(null);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const getTimestampEnterChat = async (selectedGroup) => {
try {

View File

@ -181,7 +181,13 @@ export const ChatList = ({
}, []);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
return (
<Box

View File

@ -60,7 +60,13 @@ export const ChatOptions = ({
const [searchValue, setSearchValue] = useState('');
const [selectedMember, setSelectedMember] = useState(0);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const parentRef = useRef(null);
const parentRefMentions = useRef(null);
const [lastMentionTimestamp, setLastMentionTimestamp] = useState(null);

View File

@ -40,7 +40,13 @@ export const CreateCommonSecret = ({
const [isLoading, setIsLoading] = useState(false);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const getPublishesFromAdmins = async (admins: string[]) => {
const queryString = admins.map((name) => `name=${name}`).join('&');

View File

@ -153,7 +153,13 @@ export const GroupAnnouncements = ({
editorRef.current = editorInstance;
};
const [, forceUpdate] = useReducer((x) => x + 1, 0);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const triggerRerender = () => {
forceUpdate(); // Trigger re-render by updating the state

View File

@ -33,7 +33,13 @@ export const GroupAvatar = ({
const [avatarFile, setAvatarFile] = useState(null);
const [tempAvatar, setTempAvatar] = useState(null);
const { show } = useContext(QORTAL_APP_CONTEXT);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [anchorEl, setAnchorEl] = useState(null);
const [isLoading, setIsLoading] = useState(false);
// Handle child element click to open Popover
@ -263,7 +269,13 @@ const PopoverComp = ({
myName,
}) => {
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
return (
<Popover

View File

@ -2,7 +2,13 @@ import { forwardRef, useEffect, useImperativeHandle, useState } from 'react';
import { useTranslation } from 'react-i18next';
export default forwardRef((props, ref) => {
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [selectedIndex, setSelectedIndex] = useState(0);

View File

@ -170,7 +170,13 @@ export const MessageItem = memo(
}, [message?.id]);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
return (
<>
@ -612,7 +618,13 @@ export const MessageItem = memo(
export const ReplyPreview = ({ message, isEdit = false }) => {
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
return (
<Box

View File

@ -54,7 +54,13 @@ const MenuBar = memo(
const { editor } = useCurrentEditor();
const fileInputRef = useRef(null);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
useEffect(() => {
if (editor && setEditorRef) {

View File

@ -13,7 +13,13 @@ export const CoreSyncStatus = () => {
const [coreInfos, setCoreInfos] = useState({});
const [isUsingGateway, setIsUsingGateway] = useState(false);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const theme = useTheme();
useEffect(() => {

View File

@ -67,7 +67,13 @@ export const DesktopFooter = ({
}) => {
const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
if (hide) return;
return (

View File

@ -84,7 +84,13 @@ export const DesktopHeader = ({
}) => {
const [value, setValue] = useState(0);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
return (
<Box

View File

@ -28,7 +28,13 @@ export const DesktopSideBar = ({
const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
return (
<Box

View File

@ -38,7 +38,13 @@ export const AttachmentCard = ({
const [isOpen, setIsOpen] = useState(true);
const { downloadResource } = useContext(QORTAL_APP_CONTEXT);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const saveToDisk = async () => {
const { name, service, identifier } = resourceData;

View File

@ -63,7 +63,13 @@ export const Embed = ({ embedLink }) => {
const [parsedData, setParsedData] = useState(null);
const setBlobs = useSetAtom(blobControllerAtom);
const [selectedGroupId] = useAtom(selectedGroupIdAtom);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const resourceData = useMemo(() => {
const parsedDataOnTheFly = parseQortalLink(embedLink);
if (

View File

@ -30,7 +30,13 @@ export const ImageCard = ({
encryptionType,
}) => {
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [isOpen, setIsOpen] = useState(true);
const [height, setHeight] = useState('400px');

View File

@ -40,7 +40,13 @@ export const PollCard = ({
const { show, userInfo } = useContext(QORTAL_APP_CONTEXT);
const [isLoadingSubmit, setIsLoadingSubmit] = useState(false);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const handleVote = async () => {
const fee = await getFee('VOTE_ON_POLL');
@ -379,7 +385,13 @@ const PollResults = ({ votes }) => {
...votes?.voteCounts?.map((option) => option.voteCount)
);
const options = votes?.voteCounts;
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
return (
<Box sx={{ width: '100%', p: 2 }}>

View File

@ -32,7 +32,13 @@ export const GeneralNotifications = ({ address }) => {
setAnchorEl(event.currentTarget);
};
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const theme = useTheme();
return (

View File

@ -29,7 +29,13 @@ export const JoinGroup = () => {
const [isLoadingInfo, setIsLoadingInfo] = useState(false);
const [isOpen, setIsOpen] = useState(false);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [isLoadingJoinGroup, setIsLoadingJoinGroup] = useState(false);
const handleJoinGroup = async (e) => {

View File

@ -97,7 +97,13 @@ export const AddGroup = ({ address, open, setOpen }) => {
setMaxBlock(event.target.value as string);
};
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const theme = useTheme();
const handleCreateGroup = async () => {

View File

@ -42,7 +42,13 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
const { show } = useContext(QORTAL_APP_CONTEXT);
const [memberGroups] = useAtom(memberGroupsAtom);
const setTxList = useSetAtom(txListAtom);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [groups, setGroups] = useState([]);
const [popoverAnchor, setPopoverAnchor] = useState(null); // Track which list item the popover is anchored to
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open

View File

@ -28,7 +28,13 @@ import { useTranslation } from 'react-i18next';
export const BlockedUsersModal = () => {
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [isOpenBlockedModal, setIsOpenBlockedModal] = useAtom(
isOpenBlockedModalAtom
);

View File

@ -73,7 +73,13 @@ export const GroupMail = ({
const anchorElInstanceFilter = useRef<any>(null);
const [tempPublishedList, setTempPublishedList] = useState([]);
const dataPublishes = useRef({});
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const theme = useTheme();
const [isLoading, setIsLoading] = useState(false);
const groupIdRef = useRef<any>(null);

View File

@ -144,7 +144,13 @@ export const NewThread = ({
setPostReply,
isPrivate,
}: NewMessageProps) => {
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const { show } = useContext(QORTAL_APP_CONTEXT);
const [isOpen, setIsOpen] = useState<boolean>(false);
const [value, setValue] = useState('');

View File

@ -115,7 +115,13 @@ export const Thread = ({
const [isLoading, setIsLoading] = useState(true);
const [postReply, setPostReply] = useState(null);
const [hasLastPage, setHasLastPage] = useState(false);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const theme = useTheme();
// Update: Use a new ref for the scrollable container
const threadContainerRef = useRef(null);

View File

@ -444,7 +444,13 @@ export const Group = ({
const [isForceShowCreationKeyPopup, setIsForceShowCreationKeyPopup] =
useState(false);
const groupsOwnerNamesRef = useRef({});
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [groupsProperties, setGroupsProperties] = useAtom(groupsPropertiesAtom);
const setGroupsOwnerNames = useSetAtom(groupsOwnerNamesAtom);

View File

@ -18,7 +18,13 @@ export const GroupInvites = ({ myAddress, setOpenAddGroup }) => {
const [groupsWithJoinRequests, setGroupsWithJoinRequests] = useState([]);
const [isExpanded, setIsExpanded] = useState(false);
const [loading, setLoading] = useState(true);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const theme = useTheme();
const getJoinRequests = async () => {

View File

@ -28,7 +28,13 @@ export const GroupJoinRequests = ({
setDesktopViewMode,
}) => {
const [isExpanded, setIsExpanded] = useState(false);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [groupsWithJoinRequests, setGroupsWithJoinRequests] = useState([]);
const [loading, setLoading] = useState(true);
const [txList] = useAtom(txListAtom);

View File

@ -49,7 +49,13 @@ export const GroupList = ({
myAddress,
}) => {
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [isRunningPublicNode] = useAtom(isRunningPublicNodeAtom);
return (

View File

@ -31,7 +31,13 @@ export const HomeDesktop = ({
const [checked1, setChecked1] = useState(false);
const [checked2, setChecked2] = useState(false);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const theme = useTheme();
useEffect(() => {

View File

@ -10,7 +10,13 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
const [value, setValue] = useState('');
const [expiryTime, setExpiryTime] = useState<string>('259200');
const [isLoadingInvite, setIsLoadingInvite] = useState(false);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const inviteMember = async () => {
try {

View File

@ -56,7 +56,13 @@ export const ListOfBans = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
const listRef = useRef(null);
const [isLoadingUnban, setIsLoadingUnban] = useState(false);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const getInvites = async (groupId) => {
try {

View File

@ -91,7 +91,13 @@ export const ListOfGroupPromotions = () => {
const { show } = useContext(QORTAL_APP_CONTEXT);
const setTxList = useSetAtom(txListAtom);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const listRef = useRef(null);
const rowVirtualizer = useVirtualizer({
count: promotions.length,

View File

@ -60,7 +60,13 @@ export const ListOfInvites = ({
const [popoverAnchor, setPopoverAnchor] = useState(null); // Track which list item the popover is anchored to
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
const [isLoadingCancelInvite, setIsLoadingCancelInvite] = useState(false);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const listRef = useRef(null);
const getInvites = async (groupId) => {

View File

@ -64,7 +64,13 @@ export const ListOfJoinRequests = ({
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
const listRef = useRef(null);
const [isLoadingAccept, setIsLoadingAccept] = useState(false);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const getInvites = async (groupId) => {
try {

View File

@ -42,7 +42,13 @@ const ListOfMembers = ({
const [isLoadingMakeAdmin, setIsLoadingMakeAdmin] = useState(false);
const [isLoadingRemoveAdmin, setIsLoadingRemoveAdmin] = useState(false);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const listRef = useRef(null);
const handlePopoverOpen = (event, index) => {

View File

@ -14,7 +14,13 @@ import { useTranslation } from 'react-i18next';
export const ListOfThreadPostsWatched = () => {
const [posts, setPosts] = useState([]);
const [loading, setLoading] = useState(true);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const getPosts = async () => {
try {

View File

@ -71,7 +71,13 @@ export const ManageMembers = ({
setValue(newValue);
};
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const { show } = useContext(QORTAL_APP_CONTEXT);
const setTxList = useSetAtom(txListAtom);

View File

@ -54,7 +54,13 @@ export const QMailMessages = ({ userName, userAddress }) => {
const [loading, setLoading] = useState(true);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const getMails = useCallback(async () => {
try {

View File

@ -87,7 +87,13 @@ export const Settings = ({ open, setOpen, rawWallet }) => {
const [checked, setChecked] = useState(false);
const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
setChecked(event.target.checked);
@ -235,7 +241,13 @@ const ExportPrivateKey = ({ rawWallet }) => {
const [isOpen, setIsOpen] = useState(false);
const { setOpenSnackGlobal, setInfoSnackCustom } =
useContext(QORTAL_APP_CONTEXT);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const exportPrivateKeyFunc = async () => {
try {

View File

@ -61,7 +61,13 @@ export const UserListOfInvites = ({
const [invites, setInvites] = useState<any[]>([]);
const [isLoading, setIsLoading] = useState(false);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [popoverAnchor, setPopoverAnchor] = useState(null); // Track which list item the popover is anchored to
const [openPopoverIndex, setOpenPopoverIndex] = useState(null); // Track which list item has the popover open
const listRef = useRef(null);

View File

@ -15,7 +15,13 @@ import { useAtom } from 'jotai';
import { useTranslation } from 'react-i18next';
export const WalletsAppWrapper = () => {
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const iframeRef = useRef(null);
const [isOpen, setIsOpen] = useState(false);
const [navigationController, setNavigationController] = useAtom(

View File

@ -45,7 +45,13 @@ export const MainAvatar = ({ myName, balance, setOpenSnack, setInfoSnack }) => {
const open = Boolean(anchorEl);
const id = open ? 'avatar-img' : undefined;
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const checkIfAvatarExists = async () => {
try {
@ -258,7 +264,13 @@ const PopoverComp = ({
myName,
}) => {
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
return (
<Popover

View File

@ -45,7 +45,13 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => {
const { show: showKey, message } = useModal();
const { isShow: isShowNext, onOk, show: showNext } = useModal();
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [info, setInfo] = useState(null);
const [names, setNames] = useState({});
const [accountInfos, setAccountInfos] = useState({});

View File

@ -3,7 +3,13 @@ import { Spacer } from '../common/Spacer';
import { useTranslation } from 'react-i18next';
export const NewUsersCTA = ({ balance }) => {
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
if (balance === undefined || +balance > 0) return null;

View File

@ -8,7 +8,13 @@ import { useTranslation } from 'react-i18next';
import { useAtom } from 'jotai';
export const QMailStatus = () => {
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const theme = useTheme();
const [lastEnteredTimestamp, setLastEnteredTimestamp] = useAtom(

View File

@ -7,7 +7,13 @@ import { useTranslation } from 'react-i18next';
export const QortPayment = ({ balance, show, onSuccess, defaultPaymentTo }) => {
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [paymentTo, setPaymentTo] = useState<string>(defaultPaymentTo);
const [paymentAmount, setPaymentAmount] = useState<number>(0);
const [paymentPassword, setPaymentPassword] = useState<string>('');

View File

@ -51,7 +51,13 @@ export const RegisterName = ({
);
const [nameFee, setNameFee] = useState(null);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const checkIfNameExisits = async (name) => {
if (!name?.trim()) {
setIsNameAvailable(Availability.NULL);

View File

@ -84,7 +84,13 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
const [anchorEl, setAnchorEl] = useState(null);
const { show } = useContext(QORTAL_APP_CONTEXT);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const hasChanged = useMemo(() => {
const newChanges = {

View File

@ -82,7 +82,13 @@ export default function ThemeManager() {
});
const [currentTab, setCurrentTab] = useState('light');
const nameInputRef = useRef(null);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
useEffect(() => {
if (openEditor && nameInputRef.current) {

View File

@ -5,7 +5,13 @@ import DarkModeIcon from '@mui/icons-material/DarkMode';
import { useTranslation } from 'react-i18next';
const ThemeSelector = () => {
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const { themeMode, toggleTheme } = useThemeContext();
return (

View File

@ -49,7 +49,13 @@ function formatAddress(str) {
export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [nameOrAddress, setNameOrAddress] = useState('');
const [inputValue, setInputValue] = useState('');
const { results, isLoading } = useNameSearch(inputValue);

View File

@ -14,7 +14,13 @@ import { useTranslation } from 'react-i18next';
export const WrapperUserAction = ({ children, address, name, disabled }) => {
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const [isRunningPublicNode] = useAtom(isRunningPublicNodeAtom);
const [anchorEl, setAnchorEl] = useState(null);
@ -177,7 +183,13 @@ const BlockUser = ({ address, name, handleClose }) => {
const { isUserBlocked, addToBlockList, removeBlockFromList } =
useContext(QORTAL_APP_CONTEXT);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
useEffect(() => {
if (!address) return;

View File

@ -22,7 +22,13 @@ export const useHandlePrivateApps = () => {
} = useContext(QORTAL_APP_CONTEXT);
const setSortablePinnedApps = useSetAtom(sortablePinnedAppsAtom);
const setSettingsLocalLastUpdated = useSetAtom(settingsLocalLastUpdatedAtom);
const { t } = useTranslation(['auth', 'core', 'group']);
const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const openApp = async (
privateAppProperties,