feat: hide upgrade modal

This commit is contained in:
AykutSarac 2024-12-04 23:25:59 +03:00
parent a046ef4a16
commit d614bf9d67
No known key found for this signature in database

View File

@ -5,13 +5,11 @@ import { useMantineColorScheme } from "@mantine/core";
import "@mantine/dropzone/styles.css";
import styled, { ThemeProvider } from "styled-components";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import Cookie from "js-cookie";
import { NextSeo } from "next-seo";
import { SEO } from "src/constants/seo";
import { darkTheme, lightTheme } from "src/constants/theme";
import { Editor } from "src/containers/Editor";
import { BottomBar } from "src/containers/Editor/components/BottomBar";
import { UpgradeModal } from "src/containers/Modals";
import { Toolbar } from "src/containers/Toolbar";
import useConfig from "src/store/useConfig";
import useFile from "src/store/useFile";
@ -48,12 +46,6 @@ const EditorPage = () => {
const { setColorScheme } = useMantineColorScheme();
const checkEditorSession = useFile(state => state.checkEditorSession);
const darkmodeEnabled = useConfig(state => state.darkmodeEnabled);
const [upgradeVisible, setUpgradeVisible] = React.useState(false);
React.useEffect(() => {
const isUpgradeShown = Cookie.get("upgrade_shown");
if (!isUpgradeShown) setUpgradeVisible(true);
}, []);
React.useEffect(() => {
if (isReady) checkEditorSession(query?.json);
@ -75,13 +67,6 @@ const EditorPage = () => {
<QueryClientProvider client={queryClient}>
<ExternalMode />
<ModalController />
<UpgradeModal
opened={upgradeVisible}
onClose={() => {
setUpgradeVisible(false);
Cookie.set("upgrade_shown", "true", { expires: 1 });
}}
/>
<StyledEditorWrapper>
<StyledPageWrapper>
<Toolbar />