Skip to content

Commit

Permalink
feat: hide upgrade modal
Browse files Browse the repository at this point in the history
  • Loading branch information
AykutSarac committed Dec 4, 2024
1 parent a046ef4 commit d614bf9
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/pages/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
Expand All @@ -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 />
Expand Down

0 comments on commit d614bf9

Please sign in to comment.