Rename context name

This commit is contained in:
Nicola Benaglia 2025-05-24 11:27:14 +02:00
parent 59de42b4cc
commit 9fcbd8aaff
32 changed files with 77 additions and 65 deletions

View File

@ -236,7 +236,8 @@ const defaultValuesGlobal = {
setOpenTutorialModal: () => {},
};
export const MyContext = createContext<MyContextInterface>(defaultValues);
export const QORTAL_APP_CONTEXT =
createContext<MyContextInterface>(defaultValues);
export let globalApiKey: string | null = null;
@ -2016,7 +2017,7 @@ function App() {
>
<PdfViewer />
<MyContext.Provider value={contextValue}>
<QORTAL_APP_CONTEXT.Provider value={contextValue}>
<Tutorials />
{extState === 'not-authenticated' && (
<NotAuthenticated
@ -3858,7 +3859,7 @@ function App() {
setInfoSnack={setInfoSnack}
/>
<BuyQortInformation balance={balance} />
</MyContext.Provider>
</QORTAL_APP_CONTEXT.Provider>
{extState === 'create-wallet' && walletToBeDownloaded && (
<ButtonBase

View File

@ -31,7 +31,7 @@ import { crypto } from './constants/decryptWallet';
import { LoadingButton } from '@mui/lab';
import { PasswordField } from './components';
import { HtmlTooltip } from './components/NotAuthenticated';
import { MyContext } from './App';
import { QORTAL_APP_CONTEXT } from './App';
import { useTranslation } from 'react-i18next';
const parsefilenameQortal = (filename) => {
@ -44,7 +44,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
const [seedValue, setSeedValue] = useState('');
const [seedName, setSeedName] = useState('');
const [seedError, setSeedError] = useState('');
const { hasSeenGettingStarted } = useContext(MyContext);
const { hasSeenGettingStarted } = useContext(QORTAL_APP_CONTEXT);
const [password, setPassword] = useState('');
const [isOpenSeedModal, setIsOpenSeedModal] = useState(false);
const [isLoadingEncryptSeed, setIsLoadingEncryptSeed] = useState(false);

View File

@ -16,7 +16,7 @@ import {
useTheme,
} from '@mui/material';
import { styled } from '@mui/system';
import { MyContext, getBaseApiReact } from '../../App';
import { QORTAL_APP_CONTEXT, getBaseApiReact } from '../../App';
import { Spacer } from '../../common/Spacer';
import { executeEvent } from '../../utils/events';
import { useDropzone } from 'react-dropzone';
@ -65,7 +65,7 @@ export const AppPublish = ({ names, categories }) => {
const [category, setCategory] = useState('');
const [appType, setAppType] = useState('APP');
const [file, setFile] = useState(null);
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const [tag1, setTag1] = useState('');

View File

@ -1,7 +1,7 @@
import { Box, Rating } from '@mui/material';
import { useCallback, useContext, useEffect, useRef, useState } from 'react';
import { getFee } from '../../background';
import { MyContext, getBaseApiReact } from '../../App';
import { QORTAL_APP_CONTEXT, getBaseApiReact } from '../../App';
import { CustomizedSnackbars } from '../Snackbar/Snackbar';
import { StarFilledIcon } from '../../assets/Icons/StarFilled';
import { StarEmptyIcon } from '../../assets/Icons/StarEmpty';
@ -11,7 +11,7 @@ import { useTranslation } from 'react-i18next';
export const AppRating = ({ app, myName, ratingCountPosition = 'right' }) => {
const [value, setValue] = useState(0);
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const [hasPublishedRating, setHasPublishedRating] = useState<null | boolean>(
null
);

View File

@ -1,7 +1,7 @@
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
import { AppsHomeDesktop } from './AppsHomeDesktop';
import { Spacer } from '../../common/Spacer';
import { MyContext, getBaseApiReact } from '../../App';
import { QORTAL_APP_CONTEXT, getBaseApiReact } from '../../App';
import { AppInfo } from './AppInfo';
import {
executeEvent,
@ -48,7 +48,7 @@ export const AppsDesktop = ({
const [categories, setCategories] = useState([]);
const iframeRefs = useRef({});
const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom);
const { showTutorial } = useContext(MyContext);
const { showTutorial } = useContext(QORTAL_APP_CONTEXT);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);

View File

@ -19,7 +19,7 @@ import {
Input,
} from '@mui/material';
import { Add } from '@mui/icons-material';
import { MyContext, getBaseApiReact } from '../../App';
import { QORTAL_APP_CONTEXT, getBaseApiReact } from '../../App';
import { executeEvent } from '../../utils/events';
import { Spacer } from '../../common/Spacer';
import { useModal } from '../../common/useModal';
@ -48,7 +48,7 @@ export const AppsDevModeHome = ({
setOpenSnackGlobal,
infoSnackCustom,
setInfoSnackCustom,
} = useContext(MyContext);
} = useContext(QORTAL_APP_CONTEXT);
const handleSelectFile = async (existingFilePath) => {
const filePath = existingFilePath || (await window.electron.selectFile());

View File

@ -31,7 +31,7 @@ import {
} from './Apps-styles';
import AddIcon from '@mui/icons-material/Add';
import ImageUploader from '../../common/ImageUploader';
import { MyContext } from '../../App';
import { QORTAL_APP_CONTEXT } from '../../App';
import { fileToBase64 } from '../../utils/fileReading';
import { objectToBase64 } from '../../qdn/encryption/group-encryption';
import { getFee } from '../../background';
@ -59,7 +59,7 @@ export const AppsPrivate = ({ myName }) => {
const [isOpenPrivateModal, setIsOpenPrivateModal] = useState(false);
const { show, setInfoSnackCustom, setOpenSnackGlobal } =
useContext(MyContext);
useContext(QORTAL_APP_CONTEXT);
const [memberGroups] = useAtom(memberGroupsAtom);
const theme = useTheme();

View File

@ -1,6 +1,6 @@
import { useCallback, useContext, useEffect, useState } from 'react';
import {
MyContext,
QORTAL_APP_CONTEXT,
getArbitraryEndpointReact,
getBaseApiReact,
} from '../../App';
@ -73,7 +73,7 @@ export const AdminSpaceInner = ({
useState(null);
const [isLoadingPublishKey, setIsLoadingPublishKey] = useState(false);
const { show, setInfoSnackCustom, setOpenSnackGlobal } =
useContext(MyContext);
useContext(QORTAL_APP_CONTEXT);
const { t } = useTranslation(['auth', 'core', 'group']);
const getAdminGroupSecretKey = useCallback(async () => {

View File

@ -19,7 +19,7 @@ import { LoadingSnackbar } from '../Snackbar/LoadingSnackbar';
import {
getBaseApiReact,
getBaseApiReactSocket,
MyContext,
QORTAL_APP_CONTEXT,
pauseAllQueues,
resumeAllQueues,
} from '../../App';
@ -71,7 +71,7 @@ export const ChatGroup = ({
hideView,
isPrivate,
}) => {
const { isUserBlocked, show } = useContext(MyContext);
const { isUserBlocked, show } = useContext(QORTAL_APP_CONTEXT);
const [messages, setMessages] = useState([]);
const [chatReferences, setChatReferences] = useState({});
const [isSending, setIsSending] = useState(false);

View File

@ -3,7 +3,7 @@ import { Box, Button, Typography, useTheme } from '@mui/material';
import { CustomizedSnackbars } from '../Snackbar/Snackbar';
import { LoadingButton } from '@mui/lab';
import {
MyContext,
QORTAL_APP_CONTEXT,
getArbitraryEndpointReact,
getBaseApiReact,
pauseAllQueues,
@ -32,7 +32,7 @@ export const CreateCommonSecret = ({
setIsForceShowCreationKeyPopup,
isForceShowCreationKeyPopup,
}) => {
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const setTxList = useSetAtom(txListAtom);
const [openSnack, setOpenSnack] = useState(false);

View File

@ -24,7 +24,7 @@ import { AnnouncementList } from './AnnouncementList';
import CampaignIcon from '@mui/icons-material/Campaign';
import { AnnouncementDiscussion } from './AnnouncementDiscussion';
import {
MyContext,
QORTAL_APP_CONTEXT,
getArbitraryEndpointReact,
getBaseApiReact,
pauseAllQueues,
@ -142,7 +142,7 @@ export const GroupAnnouncements = ({
const [selectedAnnouncement, setSelectedAnnouncement] = useState(null);
const [isFocusedParent, setIsFocusedParent] = useState(false);
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const [openSnack, setOpenSnack] = useState(false);
const [infoSnack, setInfoSnack] = useState(null);
const hasInitialized = useRef(false);

View File

@ -1,7 +1,7 @@
import { useCallback, useContext, useEffect, useState } from 'react';
import Logo2 from '../../assets/svgs/Logo2.svg';
import {
MyContext,
QORTAL_APP_CONTEXT,
getArbitraryEndpointReact,
getBaseApiReact,
} from '../../App';
@ -32,7 +32,7 @@ export const GroupAvatar = ({
const [hasAvatar, setHasAvatar] = useState(false);
const [avatarFile, setAvatarFile] = useState(null);
const [tempAvatar, setTempAvatar] = useState(null);
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const { t } = useTranslation(['auth', 'core', 'group']);
const [anchorEl, setAnchorEl] = useState(null);
const [isLoading, setIsLoading] = useState(false);

View File

@ -22,7 +22,7 @@ import {
useTheme,
} from '@mui/material';
import { formatTimestamp } from '../../utils/time';
import { MyContext, getBaseApiReact } from '../../App';
import { QORTAL_APP_CONTEXT, getBaseApiReact } from '../../App';
import { generateHTML } from '@tiptap/react';
import Highlight from '@tiptap/extension-highlight';
import Mention from '@tiptap/extension-mention';
@ -113,7 +113,7 @@ export const MessageItem = memo(
onEdit,
isPrivate,
}) => {
const { getIndividualUserInfo } = useContext(MyContext);
const { getIndividualUserInfo } = useContext(QORTAL_APP_CONTEXT);
const [anchorEl, setAnchorEl] = useState(null);
const [selectedReaction, setSelectedReaction] = useState(null);
const [userInfo, setUserInfo] = useState(null);

View File

@ -1,5 +1,5 @@
import { useContext, useState } from 'react';
import { MyContext, getBaseApiReact } from '../../App';
import { QORTAL_APP_CONTEXT, getBaseApiReact } from '../../App';
import {
Card,
CardContent,
@ -36,7 +36,7 @@ export const AttachmentCard = ({
selectedGroupId,
}) => {
const [isOpen, setIsOpen] = useState(true);
const { downloadResource } = useContext(MyContext);
const { downloadResource } = useContext(QORTAL_APP_CONTEXT);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);

View File

@ -1,5 +1,5 @@
import { useContext, useEffect, useState } from 'react';
import { MyContext } from '../../App';
import { QORTAL_APP_CONTEXT } from '../../App';
import {
Card,
CardContent,
@ -37,7 +37,7 @@ export const PollCard = ({
const [ownerName, setOwnerName] = useState('');
const [showResults, setShowResults] = useState(false);
const [isOpen, setIsOpen] = useState(false);
const { show, userInfo } = useContext(MyContext);
const { show, userInfo } = useContext(QORTAL_APP_CONTEXT);
const [isLoadingSubmit, setIsLoadingSubmit] = useState(false);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);

View File

@ -21,7 +21,7 @@ import {
} from '@mui/icons-material';
import { styled } from '@mui/system';
import { Refresh } from '@mui/icons-material';
import { MyContext, getBaseApiReact } from '../../App';
import { QORTAL_APP_CONTEXT, getBaseApiReact } from '../../App';
import { resourceKeySelector } from '../../atoms/global';
import { useAtomValue } from 'jotai';
@ -88,7 +88,7 @@ export const VideoPlayer: FC<VideoPlayerProps> = ({
}, [service, name, identifier]);
const download = useAtomValue(resourceKeySelector(keyIdentifier));
const { downloadResource } = useContext(MyContext);
const { downloadResource } = useContext(QORTAL_APP_CONTEXT);
const videoRef = useRef<HTMLVideoElement | null>(null);
const [playing, setPlaying] = useState(false);
const [volume, setVolume] = useState(1);

View File

@ -11,7 +11,7 @@ import {
useTheme,
} from '@mui/material';
import { CustomButtonAccept } from '../../styles/App-styles';
import { getBaseApiReact, MyContext } from '../../App';
import { getBaseApiReact, QORTAL_APP_CONTEXT } from '../../App';
import { getFee } from '../../background';
import { CustomizedSnackbars } from '../Snackbar/Snackbar';
import { FidgetSpinner } from 'react-loader-spinner';
@ -20,7 +20,7 @@ import { memberGroupsAtom, txListAtom } from '../../atoms/global';
import { useTranslation } from 'react-i18next';
export const JoinGroup = () => {
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const setTxList = useSetAtom(txListAtom);
const [memberGroups] = useAtom(memberGroupsAtom);
const [openSnack, setOpenSnack] = useState(false);

View File

@ -35,7 +35,7 @@ import { AddGroupList } from './AddGroupList';
import { UserListOfInvites } from './UserListOfInvites';
import { CustomizedSnackbars } from '../Snackbar/Snackbar';
import { getFee } from '../../background';
import { MyContext } from '../../App';
import { QORTAL_APP_CONTEXT } from '../../App';
import { subscribeToEvent, unsubscribeFromEvent } from '../../utils/events';
import { useTranslation } from 'react-i18next';
import { useSetAtom } from 'jotai';
@ -59,7 +59,7 @@ const Transition = forwardRef(function Transition(
});
export const AddGroup = ({ address, open, setOpen }) => {
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const setTxList = useSetAtom(txListAtom);
const [openAdvance, setOpenAdvance] = useState(false);

View File

@ -23,7 +23,7 @@ import {
List,
} from 'react-virtualized';
import _ from 'lodash';
import { MyContext, getBaseApiReact } from '../../App';
import { QORTAL_APP_CONTEXT, getBaseApiReact } from '../../App';
import { LoadingButton } from '@mui/lab';
import { getFee } from '../../background';
import LockIcon from '@mui/icons-material/Lock';
@ -39,7 +39,7 @@ const cache = new CellMeasurerCache({
});
export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const [memberGroups] = useAtom(memberGroupsAtom);
const setTxList = useSetAtom(txListAtom);
const { t } = useTranslation(['auth', 'core', 'group']);

View File

@ -11,7 +11,7 @@ import {
useTheme,
} from '@mui/material';
import { useContext, useEffect, useState } from 'react';
import { getBaseApiReact, MyContext } from '../../App';
import { getBaseApiReact, QORTAL_APP_CONTEXT } from '../../App';
import { Spacer } from '../../common/Spacer';
import {
executeEvent,
@ -42,7 +42,7 @@ export const BlockedUsersModal = () => {
addToBlockList,
setOpenSnackGlobal,
setInfoSnackCustom,
} = useContext(MyContext);
} = useContext(QORTAL_APP_CONTEXT);
const [blockedUsers, setBlockedUsers] = useState({
addresses: {},

View File

@ -17,7 +17,11 @@ import { ReusableModal } from './ReusableModal';
import { Spacer } from '../../../common/Spacer';
import { CreateThreadIcon } from '../../../assets/Icons/CreateThreadIcon';
import { SendNewMessage } from '../../../assets/Icons/SendNewMessage';
import { MyContext, pauseAllQueues, resumeAllQueues } from '../../../App';
import {
QORTAL_APP_CONTEXT,
pauseAllQueues,
resumeAllQueues,
} from '../../../App';
import { getFee } from '../../../background';
import TipTap from '../../Chat/TipTap';
import { MessageDisplay } from '../../Chat/MessageDisplay';
@ -141,7 +145,7 @@ export const NewThread = ({
isPrivate,
}: NewMessageProps) => {
const { t } = useTranslation(['auth', 'core', 'group']);
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const [isOpen, setIsOpen] = useState<boolean>(false);
const [value, setValue] = useState('');
const [isSending, setIsSending] = useState(false);

View File

@ -21,7 +21,7 @@ import { LoadingButton } from '@mui/lab';
import LockIcon from '@mui/icons-material/Lock';
import NoEncryptionGmailerrorredIcon from '@mui/icons-material/NoEncryptionGmailerrorred';
import {
MyContext,
QORTAL_APP_CONTEXT,
getArbitraryEndpointReact,
getBaseApiReact,
} from '../../App';
@ -88,7 +88,7 @@ export const ListOfGroupPromotions = () => {
const [fee, setFee] = useState(null);
const [isLoadingJoinGroup, setIsLoadingJoinGroup] = useState(false);
const [isLoadingPublish, setIsLoadingPublish] = useState(false);
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const setTxList = useSetAtom(txListAtom);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);

View File

@ -25,7 +25,7 @@ import { ListOfBans } from './ListOfBans';
import { ListOfJoinRequests } from './ListOfJoinRequests';
import { Box, ButtonBase, Card, Tab, Tabs, useTheme } from '@mui/material';
import { CustomizedSnackbars } from '../Snackbar/Snackbar';
import { MyContext, getBaseApiReact } from '../../App';
import { QORTAL_APP_CONTEXT, getBaseApiReact } from '../../App';
import { getGroupMembers, getNames } from './Group';
import { LoadingSnackbar } from '../Snackbar/LoadingSnackbar';
import { getFee } from '../../background';
@ -72,7 +72,7 @@ export const ManageMembers = ({
};
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const setTxList = useSetAtom(txListAtom);
const handleClose = () => {

View File

@ -38,7 +38,7 @@ import { Spacer } from '../../common/Spacer';
import PhraseWallet from '../../utils/generateWallet/phrase-wallet';
import { walletVersion } from '../../background';
import Base58 from '../../deps/Base58';
import { MyContext } from '../../App';
import { QORTAL_APP_CONTEXT } from '../../App';
import { useTranslation } from 'react-i18next';
const LocalNodeSwitch = styled(Switch)(({ theme }) => ({
@ -233,7 +233,8 @@ const ExportPrivateKey = ({ rawWallet }) => {
const [password, setPassword] = useState('');
const [privateKey, setPrivateKey] = useState('');
const [isOpen, setIsOpen] = useState(false);
const { setOpenSnackGlobal, setInfoSnackCustom } = useContext(MyContext);
const { setOpenSnackGlobal, setInfoSnackCustom } =
useContext(QORTAL_APP_CONTEXT);
const { t } = useTranslation(['auth', 'core', 'group']);
const exportPrivateKeyFunc = async () => {

View File

@ -14,7 +14,7 @@ import {
CellMeasurerCache,
List,
} from 'react-virtualized';
import { MyContext, getBaseApiReact } from '../../App';
import { QORTAL_APP_CONTEXT, getBaseApiReact } from '../../App';
import { LoadingButton } from '@mui/lab';
import { getFee } from '../../background';
import LockIcon from '@mui/icons-material/Lock';
@ -55,7 +55,7 @@ export const UserListOfInvites = ({
setInfoSnack,
setOpenSnack,
}) => {
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const setTxList = useSetAtom(txListAtom);
const [invites, setInvites] = useState<any[]>([]);

View File

@ -1,6 +1,10 @@
import { useContext, useEffect, useState } from 'react';
import Logo2 from '../assets/svgs/Logo2.svg';
import { MyContext, getArbitraryEndpointReact, getBaseApiReact } from '../App';
import {
QORTAL_APP_CONTEXT,
getArbitraryEndpointReact,
getBaseApiReact,
} from '../App';
import {
Avatar,
Box,
@ -22,7 +26,7 @@ export const MainAvatar = ({ myName, balance, setOpenSnack, setInfoSnack }) => {
const [hasAvatar, setHasAvatar] = useState(false);
const [avatarFile, setAvatarFile] = useState(null);
const [tempAvatar, setTempAvatar] = useState(null);
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const [anchorEl, setAnchorEl] = useState(null);
const [isLoading, setIsLoading] = useState(false);

View File

@ -32,7 +32,7 @@ import Tooltip, { TooltipProps, tooltipClasses } from '@mui/material/Tooltip';
import ThemeSelector from './Theme/ThemeSelector';
import { useTranslation } from 'react-i18next';
import LanguageSelector from './Language/LanguageSelector';
import { MyContext } from '../App';
import { QORTAL_APP_CONTEXT } from '../App';
export const manifestData = {
version: '0.5.4',
@ -81,7 +81,8 @@ export const NotAuthenticated = ({
const [showSelectApiKey, setShowSelectApiKey] = useState(false);
const [enteredApiKey, setEnteredApiKey] = useState('');
const [customNodeToSaveIndex, setCustomNodeToSaveIndex] = useState(null);
const { showTutorial, hasSeenGettingStarted } = useContext(MyContext);
const { showTutorial, hasSeenGettingStarted } =
useContext(QORTAL_APP_CONTEXT);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core']);

View File

@ -18,7 +18,7 @@ import {
useTheme,
} from '@mui/material';
import { objectToBase64 } from '../../qdn/encryption/group-encryption';
import { MyContext } from '../../App';
import { QORTAL_APP_CONTEXT } from '../../App';
import { getFee } from '../../background';
import { CustomizedSnackbars } from '../Snackbar/Snackbar';
import { SaveIcon } from '../../assets/Icons/SaveIcon';
@ -82,7 +82,7 @@ export const Save = ({ isDesktop, disableWidth, myName }) => {
const [oldPinnedApps, setOldPinnedApps] = useAtom(oldPinnedAppsAtom);
const [anchorEl, setAnchorEl] = useState(null);
const { show } = useContext(MyContext);
const { show } = useContext(QORTAL_APP_CONTEXT);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);

View File

@ -1,5 +1,5 @@
import { useContext, useState } from 'react';
import { MyContext } from '../../App';
import { QORTAL_APP_CONTEXT } from '../../App';
import {
Button,
Dialog,
@ -16,7 +16,8 @@ import { VideoPlayer } from '../Embeds/VideoPlayer';
import { useTranslation } from 'react-i18next';
export const Tutorials = () => {
const { openTutorialModal, setOpenTutorialModal } = useContext(MyContext);
const { openTutorialModal, setOpenTutorialModal } =
useContext(QORTAL_APP_CONTEXT);
const [multiNumber, setMultiNumber] = useState(0);
const theme = useTheme();
const { t } = useTranslation(['core', 'tutorial']);

View File

@ -7,7 +7,7 @@ import {
useTheme,
} from '@mui/material';
import { executeEvent } from '../utils/events';
import { MyContext } from '../App';
import { QORTAL_APP_CONTEXT } from '../App';
import { useAtom } from 'jotai';
import { isRunningPublicNodeAtom } from '../atoms/global';
import { useTranslation } from 'react-i18next';
@ -175,7 +175,7 @@ const BlockUser = ({ address, name, handleClose }) => {
const [isAlreadyBlocked, setIsAlreadyBlocked] = useState(null);
const [isLoading, setIsLoading] = useState(false);
const { isUserBlocked, addToBlockList, removeBlockFromList } =
useContext(MyContext);
useContext(QORTAL_APP_CONTEXT);
const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);

View File

@ -1,6 +1,6 @@
import { useContext, useState } from 'react';
import { executeEvent } from '../utils/events';
import { getBaseApiReact, MyContext } from '../App';
import { getBaseApiReact, QORTAL_APP_CONTEXT } from '../App';
import { createEndpoint } from '../background';
import {
settingsLocalLastUpdatedAtom,
@ -19,7 +19,7 @@ export const useHandlePrivateApps = () => {
setOpenSnackGlobal,
infoSnackCustom,
setInfoSnackCustom,
} = useContext(MyContext);
} = useContext(QORTAL_APP_CONTEXT);
const setSortablePinnedApps = useSetAtom(sortablePinnedAppsAtom);
const setSettingsLocalLastUpdated = useSetAtom(settingsLocalLastUpdatedAtom);
const { t } = useTranslation(['auth', 'core', 'group']);

View File

@ -4,7 +4,7 @@ import { navigationControllerAtom } from '../atoms/global';
import { Filesystem, Directory } from '@capacitor/filesystem';
import { saveFile } from '../qortalRequests/get';
import { mimeToExtensionMap } from '../utils/memeTypes';
import { MyContext } from '../App';
import { QORTAL_APP_CONTEXT } from '../App';
import FileSaver from 'file-saver';
import { useSetAtom } from 'jotai';
@ -526,7 +526,7 @@ export const useQortalMessageListener = (
setOpenSnackGlobal,
infoSnackCustom,
setInfoSnackCustom,
} = useContext(MyContext);
} = useContext(QORTAL_APP_CONTEXT);
useEffect(() => {
if (tabId && !isNaN(history?.currentIndex)) {