mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-12 19:02:53 +08:00
feat: hide upgrade modal
This commit is contained in:
parent
a046ef4a16
commit
d614bf9d67
@ -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 />
|
||||
|
Loading…
x
Reference in New Issue
Block a user