Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

remove news

AykutSaracc4a9ee510023
diff --git a/README.md b/README.md
index 50eebe00..33187464 100644
--- a/README.md
+++ b/README.md
@@ -6,8 +6,7 @@
<h4 align="center">
<a href="https://jsoncrack.com">JSON Crack</a> |
<a href="https://marketplace.visualstudio.com/items?itemName=AykutSarac.jsoncrack-vscode">VS Code Extension</a> |
- <a href="https://jsoncrack.com/docs">Documentation</a> |
- <a href="https://editor.herowand.com">Herowand Editor</a>
+ <a href="https://jsoncrack.com/docs">Documentation</a>
</h4>
<div align="center">
@@ -50,7 +49,7 @@ JSON Crack is a free, open-source JSON visualization app that will revolutionize
## Sponsors & support
-If you like the project, you can become a sponsor at [GitHub Sponsors](https://github.com/sponsors/AykutSarac) or use [Herowand Editor](https://editor.herowand.com/).
+If you like the project, you can become a sponsor at [GitHub Sponsors](https://github.com/sponsors/AykutSarac) or use [Premium](https://patreon.com/join/herowand).
## Running Locally
diff --git a/src/containers/Modals/HerowandModal/index.tsx b/src/containers/Modals/HerowandModal/index.tsx
deleted file mode 100644
index f0286bd8..00000000
--- a/src/containers/Modals/HerowandModal/index.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import React from "react";
-import {
- Modal,
- Group,
- Button,
- MantineProvider,
- Image,
- Text,
- Paper,
- ModalProps,
- Anchor,
-} from "@mantine/core";
-
-export const HerowandModal: React.FC<ModalProps> = ({ opened, onClose }) => {
- return (
- <MantineProvider theme={{ colorScheme: "dark" }}>
- <Modal title="What's New?" opened={opened} onClose={onClose} centered>
- <Group>
- <Anchor href="https://editor.herowand.com">
- <Paper withBorder>
- <Image
- radius="md"
- mx="auto"
- src="assets/herowand_banner.webp"
- width={400}
- alt="herowand"
- />
- </Paper>
- </Anchor>
- </Group>
- <Text pt="lg">
- Introducing you something new...
- <hr />
- Now, you can visualize not only JSON but also other data formats. Explore Herowand Editor.
- </Text>
- <Group pt="lg" position="right">
- <Button color="red" onClick={onClose}>
- Dismiss
- </Button>
- <Button onClick={onClose} component="a" href="https://editor.herowand.com/?ref=jsoncrack">
- Show me!
- </Button>
- </Group>
- </Modal>
- </MantineProvider>
- );
-};
diff --git a/src/pages/editor.tsx b/src/pages/editor.tsx
index 6ae1d133..d72ef27b 100644
--- a/src/pages/editor.tsx
+++ b/src/pages/editor.tsx
@@ -2,12 +2,10 @@ import React from "react";
import Head from "next/head";
import { useRouter } from "next/router";
import styled from "styled-components";
-import Cookie from "universal-cookie";
import { defaultJson } from "src/constants/data";
import { BottomBar } from "src/containers/Editor/BottomBar";
import { Tools } from "src/containers/Editor/LiveEditor/Tools";
import Panes from "src/containers/Editor/Panes";
-import { HerowandModal } from "src/containers/Modals/HerowandModal";
import { Loading } from "src/layout/Loading";
import useFile from "src/store/useFile";
import useJson from "src/store/useJson";
@@ -28,12 +26,8 @@ export const StyledEditorWrapper = styled.div`
overflow: hidden;
`;
-const cookie = new Cookie();
-const newsCookie = cookie.get("news_seen");
-
const EditorPage: React.FC = () => {
const { isReady, query } = useRouter();
- const [showNews, setShowNews] = React.useState(false);
const checkSession = useUser(state => state.checkSession);
const loading = useJson(state => state.loading);
const setContents = useFile(state => state.setContents);
@@ -49,16 +43,7 @@ const EditorPage: React.FC = () => {
setContents({ contents: defaultJson, hasChanges: false });
}
}
-
- if (typeof newsCookie === "undefined") {
- setShowNews(true);
- } else setShowNews(false);
- }, [checkSession, fetchFile, fetchUrl, isReady, query.json, query.url, setContents]);
-
- const closeNews = React.useCallback(() => {
- setShowNews(false);
- cookie.set("news_seen", true, { path: "/", maxAge: 43200 });
- }, []);
+ }, [checkSession, fetchFile, fetchUrl, isReady, query, setContents]);
if (loading) return <Loading message="Fetching JSON from cloud..." />;
@@ -75,7 +60,6 @@ const EditorPage: React.FC = () => {
</StyledEditorWrapper>
</StyledPageWrapper>
<BottomBar />
- <HerowandModal opened={showNews} onClose={closeNews} />
</StyledEditorWrapper>
);
};