Skip to content

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

feat: add json path & update ui

AykutSaracb59aa0e9ba20
diff --git a/package.json b/package.json
index 62959838..b50233ae 100644
--- a/package.json
+++ b/package.json
@@ -32,6 +32,7 @@
"json-schema-faker": "^0.5.6",
"json_typegen_wasm": "^0.7.0",
"jsonc-parser": "^3.3.1",
+ "jsonpath-plus": "^9.0.0",
"jsonwebtoken": "^9.0.2",
"jxon": "2.0.0-beta.5",
"lodash.debounce": "^4.0.8",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 7901f6d0..30090e67 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -65,6 +65,9 @@ importers:
jsonc-parser:
specifier: ^3.3.1
version: 3.3.1
+ jsonpath-plus:
+ specifier: ^9.0.0
+ version: 9.0.0
jsonwebtoken:
specifier: ^9.0.2
version: 9.0.2
@@ -345,6 +348,18 @@ packages:
'@jridgewell/[email protected]':
resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}
+ '@jsep-plugin/[email protected]':
+ resolution: {integrity: sha512-gaHqbubTi29aZpVbBlECRpmdia+L5/lh2BwtIJTmtxdbecEyyX/ejAOg7eQDGNvGOUmPY7Z2Yxdy9ioyH/VJeA==}
+ engines: {node: '>= 10.16.0'}
+ peerDependencies:
+ jsep: ^0.4.0||^1.0.0
+
+ '@jsep-plugin/[email protected]':
+ resolution: {integrity: sha512-XfZgry4DwEZvSFtS/6Y+R48D7qJYJK6R9/yJFyUFHCIUMEEHuJ4X95TDgJp5QkmzfLYvapMPzskV5HpIDrREug==}
+ engines: {node: '>= 10.16.0'}
+ peerDependencies:
+ jsep: ^0.4.0||^1.0.0
+
'@juggle/[email protected]':
resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==}
@@ -1760,6 +1775,10 @@ packages:
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
hasBin: true
+ resolution: {integrity: sha512-i1rBX5N7VPl0eYb6+mHNp52sEuaS2Wi8CDYx1X5sn9naevL78+265XJqy1qENEk7mRKwS06NHpUqiBwR7qeodw==}
+ engines: {node: '>= 10.16.0'}
+
resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==}
engines: {node: '>=4'}
@@ -1800,6 +1819,11 @@ packages:
resolution: {integrity: sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA==}
engines: {node: '>=12.0.0'}
+ resolution: {integrity: sha512-bqE77VIDStrOTV/czspZhTn+o27Xx9ZJRGVkdVShEtPoqsIx5yALv3lWVU6y+PqYvWPJNWE7ORCQheQkEe0DDA==}
+ engines: {node: '>=14.0.0'}
+ hasBin: true
+
resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==}
engines: {node: '>=12', npm: '>=6'}
@@ -2997,6 +3021,14 @@ snapshots:
'@jridgewell/resolve-uri': 3.1.2
'@jridgewell/sourcemap-codec': 1.5.0
+ dependencies:
+ jsep: 1.3.9
+
+ dependencies:
+ jsep: 1.3.9
+
'@juggle/[email protected]': {}
'@ljharb/[email protected]':
@@ -4655,6 +4687,8 @@ snapshots:
dependencies:
argparse: 2.0.1
+
@@ -4689,6 +4723,12 @@ snapshots:
+ dependencies:
+ '@jsep-plugin/assignment': 1.2.1([email protected])
+ '@jsep-plugin/regex': 1.0.3([email protected])
+ jsep: 1.3.9
+
dependencies:
jws: 3.2.2
diff --git a/src/containers/Editor/LiveEditor/index.tsx b/src/containers/Editor/LiveEditor/index.tsx
index 689987ae..9fd4377f 100644
--- a/src/containers/Editor/LiveEditor/index.tsx
+++ b/src/containers/Editor/LiveEditor/index.tsx
@@ -1,9 +1,13 @@
import React from "react";
+import { Button, ButtonGroup } from "@mantine/core";
import styled from "styled-components";
+import { MdAdd } from "react-icons/md";
+import { VscLock } from "react-icons/vsc";
import { ViewMode } from "src/enums/viewMode.enum";
import { GraphView } from "src/modules/GraphView";
import { TreeView } from "src/modules/TreeView";
import useConfig from "src/store/useConfig";
+import useModal from "src/store/useModal";
const StyledLiveEditor = styled.div`
position: relative;
@@ -19,6 +23,13 @@ const StyledLiveEditor = styled.div`
font-size: 14px;
font-weight: 500;
}
+
+ .tab-group {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ z-index: 2;
+ }
`;
const View = () => {
@@ -30,8 +41,26 @@ const View = () => {
};
const LiveEditor = () => {
+ const setVisible = useModal(state => state.setVisible);
+
return (
<StyledLiveEditor onContextMenuCapture={e => e.preventDefault()}>
+ <ButtonGroup className="tab-group">
+ <Button
+ fw={500}
+ c="gray"
+ miw={80}
+ size="xs"
+ variant="default"
+ rightSection={<VscLock />}
+ onClick={() => setVisible("upgrade")(true)}
+ >
+ Tab 1
+ </Button>
+ <Button size="xs" variant="default" onClick={() => setVisible("upgrade")(true)}>
+ <MdAdd />
+ </Button>
+ </ButtonGroup>
<View />
</StyledLiveEditor>
);
diff --git a/src/containers/Modals/CloudModal/index.tsx b/src/containers/Modals/CloudModal/index.tsx
index b6a1afe7..6f0d854d 100644
--- a/src/containers/Modals/CloudModal/index.tsx
+++ b/src/containers/Modals/CloudModal/index.tsx
@@ -270,7 +270,7 @@ export const CloudModal = ({ opened, onClose }: ModalProps) => {
<RingProgress
size={20}
roundCaps
- thickness={3}
+ thickness={2}
sections={[
{
value: (data.length * 100) / TOTAL_QUOTA,
@@ -278,11 +278,9 @@ export const CloudModal = ({ opened, onClose }: ModalProps) => {
},
]}
/>
- <div>
- <Text fw={700} size="xs">
- {data.length} / {TOTAL_QUOTA}
- </Text>
- </div>
+ <Text fw={700} size="xs">
+ {data.length} / {TOTAL_QUOTA}
+ </Text>
</Flex>
</Flex>
)}
diff --git a/src/containers/Modals/JPathModal/index.tsx b/src/containers/Modals/JPathModal/index.tsx
new file mode 100644
index 00000000..04bd01b6
--- /dev/null
+++ b/src/containers/Modals/JPathModal/index.tsx
@@ -0,0 +1,59 @@
+import React from "react";
+import type { ModalProps } from "@mantine/core";
+import { Stack, Modal, Button, Text, Anchor, Group, TextInput } from "@mantine/core";
+import { JSONPath } from "jsonpath-plus";
+import toast from "react-hot-toast";
+import { VscLinkExternal } from "react-icons/vsc";
+import { gaEvent } from "src/lib/utils/gaEvent";
+import useFile from "src/store/useFile";
+import useJson from "src/store/useJson";
+
+export const JPathModal = ({ opened, onClose }: ModalProps) => {
+ const getJson = useJson(state => state.getJson);
+ const setContents = useFile(state => state.setContents);
+ const [query, setQuery] = React.useState("");
+
+ const evaluteJsonPath = () => {
+ try {
+ const json = getJson();
+ const result = JSONPath({ path: query, json: JSON.parse(json) });
+
+ setContents({ contents: JSON.stringify(result, null, 2) });
+ gaEvent("JSON Path Modal", "evaluate JSON Path");
+ onClose();
+ } catch (error) {
+ if (error instanceof Error) toast.error(error.message);
+ }
+ };
+
+ return (
+ <Modal title="JSON Path" size="lg" opened={opened} onClose={onClose} centered>
+ <Stack py="sm">
+ <Text fz="sm">
+ JsonPath expressions always refer to a JSON structure in the same way as XPath expression
+ are used in combination with an XML document. The &quot;root member object&quot; in
+ JsonPath is always referred to as $ regardless if it is an object or array.
+ <br />
+ <Anchor
+ fz="sm"
+ target="_blank"
+ href="https://docs.oracle.com/cd/E60058_01/PDF/8.0.8.x/8.0.8.0.0/PMF_HTML/JsonPath_Expressions.htm"
+ >
+ Read documentation. <VscLinkExternal />
+ </Anchor>
+ </Text>
+ <TextInput
+ value={query}
+ onChange={e => setQuery(e.currentTarget.value)}
+ placeholder="Enter JSON Path..."
+ data-autofocus
+ />
+ <Group justify="right" mt="sm">
+ <Button onClick={evaluteJsonPath} disabled={!query.length}>
+ Run
+ </Button>
+ </Group>
+ </Stack>
+ </Modal>
+ );
+};
diff --git a/src/containers/Modals/UpgradeModal/index.tsx b/src/containers/Modals/UpgradeModal/index.tsx
index 71c262ca..b12967a9 100644
--- a/src/containers/Modals/UpgradeModal/index.tsx
+++ b/src/containers/Modals/UpgradeModal/index.tsx
@@ -4,7 +4,6 @@ import {
Text,
Flex,
Divider,
- Paper,
List,
Drawer,
Stack,
@@ -12,10 +11,11 @@ import {
Badge,
Button,
Group,
+ Anchor,
} from "@mantine/core";
import styled from "styled-components";
import { IoMdCheckmarkCircleOutline } from "react-icons/io";
-import { MdOutlineTimer } from "react-icons/md";
+import { MdChevronRight, MdOutlineTimer } from "react-icons/md";
import { gaEvent } from "src/lib/utils/gaEvent";
import { PRICING, purchaseLinks } from "src/pages/pricing";
import useUser from "src/store/useUser";
@@ -27,15 +27,13 @@ const StyledRadioCard = styled(Radio.Card)`
transition: 0.2s;
&[data-checked] {
- border-color: #2d2d2d;
+ border-color: #2cb200;
+ background: #f9fff7;
}
- &[data-checked]:hover {
- background: #f3f3f3;
- }
-
- &:hover {
- border-color: #7f7f7f;
+ &:hover:not([data-checked]) {
+ border-color: #d5d5d5;
+ background: #fafafa;
}
`;
@@ -67,103 +65,114 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => {
position="bottom"
radius="lg"
styles={{
- body: { background: "white" },
- header: { background: "white" },
+ body: { background: "#ffffff" },
+ header: { background: "#ffffff" },
+ content: { background: "#ffffff" },
}}
>
- <Paper
- bg="white"
- miw={600}
- p={30}
- radius="lg"
- mx="auto"
- w="fit-content"
- style={{
- border: "2px solid #e2e2e2",
- }}
- >
- <Flex gap="3vw" justify="space-between">
+ <Flex mx="auto" w="fit-content" miw={600} gap="3vw" justify="space-between">
+ <Stack>
+ <Text c="black" fz="h2" fw={600}>
+ Upgrade
+ </Text>
+ <Divider fz="md" labelPosition="left" label="Included features" color="gray.4" />
+ <List
+ spacing="xs"
+ c="gray.7"
+ icon={<IoMdCheckmarkCircleOutline size="24" color="#16a34a" />}
+ >
+ <List.Item>Larger data support up to 4 MB</List.Item>
+ <List.Item>Compare data differences on graph</List.Item>
+ <List.Item>AI-powered data filter</List.Item>
+ <List.Item>Customizable graph colors</List.Item>
+ <List.Item>Edit data directly on graph</List.Item>
+ <List.Item>Tabs for multiple documents</List.Item>
+ <List.Item>
+ <Anchor c="inherit" td="underline" href="/premium#preview" target="_blank">
+ ..see all features
+ </Anchor>
+ </List.Item>
+ </List>
+ </Stack>
+ <Radio.Group value={plan} onChange={setPlan}>
<Stack>
- <Text c="black" fz="h2" fw={600}>
- Upgrade
- </Text>
- <Divider fz="md" labelPosition="left" label="Included features" color="gray.4" />
- <List
- spacing="xs"
- c="gray.7"
- icon={<IoMdCheckmarkCircleOutline size="24" color="#16a34a" />}
- >
- <List.Item>Larger data support up to 4 MB</List.Item>
- <List.Item>Compare data differences on graph</List.Item>
- <List.Item>AI-powered data filter</List.Item>
- <List.Item>Customizable graph colors</List.Item>
- <List.Item>Edit data directly on graph</List.Item>
- <List.Item>Tabs for multiple documents</List.Item>
- </List>
+ <StyledRadioCard value="monthly" radius="lg" px="xl" py="md">
+ <Group align="center" justify="space-between">
+ <Flex align="center" gap="xs">
+ <Text fz="xl" c="gray.7" fw={600}>
+ Monthly
+ </Text>
+ </Flex>
+ <Flex fw={500} align="baseline" fz="sm" c="gray.5">
+ <Text fw={600} fz="xl" c="gray.7" mr="2">
+ ${PRICING.MONTHLY}
+ </Text>
+ <Text inherit mr="2">
+ /
+ </Text>
+ month
+ </Flex>
+ </Group>
+ </StyledRadioCard>
+ <StyledRadioCard value="annual" radius="lg" px="xl" py="md">
+ <Group align="center" justify="space-between">
+ <Flex align="center" gap="xs">
+ <Text fz="xl" c="gray.7" fw={600}>
+ Yearly
+ </Text>
+ </Flex>
+ <Flex fw={500} align="baseline" fz="sm" c="gray.5">
+ <Text fw={600} fz="xl" c="gray.7" mr="2">
+ ${PRICING.ANNUAL * 12}
+ </Text>
+ <Text inherit mr="2">
+ /
+ </Text>
+ year
+ </Flex>
+ </Group>
+ </StyledRadioCard>
+ <StyledRadioCard value="ltd" radius="lg" px="xl" py="md">
+ <Group align="center" justify="space-between">
+ <Flex align="center" gap="xs">
+ <Text fz="xl" c="gray.7" fw={600}>
+ Lifetime
+ </Text>
+ <Badge
+ variant="light"
+ size="md"
+ radius="lg"
+ color="#f00"
+ leftSection={<MdOutlineTimer size="12" />}
+ >
+ Limited
+ </Badge>
+ </Flex>
+ <Flex fw={500} align="baseline" fz="sm" c="gray.5">
+ <Text fw={600} fz="xl" c="gray.7" mr="2">
+ ${PRICING.LTD}
+ </Text>
+ <Text inherit mr="2">
+ /
+ </Text>
+ lifetime
+ </Flex>
+ </Group>
+ </StyledRadioCard>
</Stack>
- <Radio.Group value={plan} onChange={setPlan}>
- <Stack>
- <StyledRadioCard value="monthly" radius="lg" px="xl" py="md">
- <Group align="center" justify="space-between">
- <Flex align="center" gap="xs">
- <Text fz="xl" c="gray.7" fw={600}>
- Monthly
- </Text>
- </Flex>
- <Flex fw={500} align="baseline" fz="sm" c="gray.5">
- <Text fw={600} fz="xl" c="gray.7">
- ${PRICING.MONTHLY}
- </Text>
- /month
- </Flex>
- </Group>
- </StyledRadioCard>
- <StyledRadioCard value="annual" radius="lg" px="xl" py="md">
- <Group align="center" justify="space-between">
- <Flex align="center" gap="xs">
- <Text fz="xl" c="gray.7" fw={600}>
- Yearly
- </Text>
- </Flex>
- <Flex fw={500} align="baseline" fz="sm" c="gray.5">
- <Text fw={600} fz="xl" c="gray.7">
- ${PRICING.ANNUAL * 12}
- </Text>
- /year
- </Flex>
- </Group>
- </StyledRadioCard>
- <StyledRadioCard value="ltd" radius="lg" px="xl" py="md">
- <Group align="center" justify="space-between">
- <Flex align="center" gap="xs">
- <Text fz="xl" c="gray.7" fw={600}>
- Lifetime
- </Text>
- <Badge
- variant="light"
- size="sm"
- radius="lg"
- color="red"
- leftSection={<MdOutlineTimer size="12" />}
- >
- Limited
- </Badge>
- </Flex>
- <Flex fw={500} align="baseline" fz="sm" c="gray.5">
- <Text fw={600} fz="xl" c="gray.7">
- ${PRICING.LTD}
- </Text>
- /lifetime
- </Flex>
- </Group>
- </StyledRadioCard>
- </Stack>
- <Button color="dark" fullWidth mt="xl" size="xl" radius="md" onClick={handleUpgrade}>
- Upgrade
- </Button>
- </Radio.Group>
- </Flex>
- </Paper>
+ <Button
+ color="green"
+ fullWidth
+ mt="xl"
+ size="xl"
+ radius="md"
+ onClick={handleUpgrade}
+ rightSection={<MdChevronRight size="24" />}
+ >
+ Upgrade
+ </Button>
+ </Radio.Group>
+ </Flex>
</Drawer>
);
};
diff --git a/src/containers/Modals/index.ts b/src/containers/Modals/index.ts
index 359aef72..534d03bd 100644
--- a/src/containers/Modals/index.ts
+++ b/src/containers/Modals/index.ts
@@ -12,6 +12,7 @@ export { SchemaModal } from "./SchemaModal";
export { ReviewModal } from "./ReviewModal";
export { JQModal } from "./JQModal";
export { TypeModal } from "./TypeModal";
+export { JPathModal } from "./JPathModal";
type Modal =
| "clear"
@@ -27,6 +28,7 @@ type Modal =
| "schema"
| "review"
| "jq"
- | "type";
+ | "type"
+ | "jpath";
export type { Modal };
diff --git a/src/containers/Toolbar/OptionsMenu.tsx b/src/containers/Toolbar/OptionsMenu.tsx
index 5bc78784..fd68ceea 100644
--- a/src/containers/Toolbar/OptionsMenu.tsx
+++ b/src/containers/Toolbar/OptionsMenu.tsx
@@ -2,11 +2,14 @@ import React from "react";
import { Menu, Text, Flex } from "@mantine/core";
import { BsCheck2 } from "react-icons/bs";
import { MdSettings } from "react-icons/md";
+import { VscLock } from "react-icons/vsc";
import { gaEvent } from "src/lib/utils/gaEvent";
import useConfig from "src/store/useConfig";
+import useModal from "src/store/useModal";
import * as Styles from "./styles";
export const OptionsMenu = () => {
+ const setVisible = useModal(state => state.setVisible);
const toggleGestures = useConfig(state => state.toggleGestures);
const toggleChildrenCount = useConfig(state => state.toggleChildrenCount);
const toggleDarkMode = useConfig(state => state.toggleDarkMode);
@@ -85,6 +88,16 @@ export const OptionsMenu = () => {
>
<Text size="xs">Dark Mode</Text>
</Menu.Item>
+ <Menu.Item
+ closeMenuOnClick
+ leftSection={<VscLock />}
+ onClick={() => {
+ setVisible("upgrade")(true);
+ gaEvent("Options Menu", "toggle dark mode", darkmodeEnabled ? "on" : "off");
+ }}
+ >
+ <Text size="xs">Customize Graph Colors</Text>
+ </Menu.Item>
</Menu.Dropdown>
</Menu>
);
diff --git a/src/containers/Toolbar/SearchInput.tsx b/src/containers/Toolbar/SearchInput.tsx
index c514f036..ff984fb3 100644
--- a/src/containers/Toolbar/SearchInput.tsx
+++ b/src/containers/Toolbar/SearchInput.tsx
@@ -16,6 +16,8 @@ export const SearchInput = () => {
value={searchValue}
onChange={e => setValue(e.currentTarget.value)}
placeholder="Search Node"
+ autoComplete="off"
+ autoCorrect="off"
onKeyDown={getHotkeyHandler([["Enter", skip]])}
leftSection={<AiOutlineSearch />}
rightSection={
diff --git a/src/containers/Toolbar/ToolsMenu.tsx b/src/containers/Toolbar/ToolsMenu.tsx
index 3ff8a0a7..7d08c587 100644
--- a/src/containers/Toolbar/ToolsMenu.tsx
+++ b/src/containers/Toolbar/ToolsMenu.tsx
@@ -4,7 +4,8 @@ import { JSONSchemaFaker } from "json-schema-faker";
import toast from "react-hot-toast";
import { CgChevronDown } from "react-icons/cg";
import { FaRandom } from "react-icons/fa";
-import { MdCompare } from "react-icons/md";
+import { FaWandMagicSparkles } from "react-icons/fa6";
+import { MdCompare, MdFilterListAlt } from "react-icons/md";
import { SiJsonwebtokens } from "react-icons/si";
import { VscSearchFuzzy, VscJson, VscGroupByRefType, VscLock } from "react-icons/vsc";
import { gaEvent } from "src/lib/utils/gaEvent";
@@ -74,17 +75,27 @@ export const ToolsMenu = () => {
>
JSON Schema
</Menu.Item>
+ <Menu.Item
+ fz={12}
+ leftSection={<MdFilterListAlt />}
+ onClick={() => {
+ setVisible("jpath")(true);
+ gaEvent("Tools Menu", "open", "JSON Path");
+ }}
+ >
+ JSON Path
+ </Menu.Item>
<Menu.Divider />
<Menu.Item
fz={12}
- leftSection={<MdCompare />}
+ leftSection={<FaWandMagicSparkles />}
rightSection={<VscLock />}
onClick={() => {
setVisible("upgrade")(true);
- gaEvent("Tools Menu", "open", "Compare Data");
+ gaEvent("Tools Menu", "open", "AI Filter");
}}
>
- Compare Data
+ AI-Powered Filter
</Menu.Item>
<Menu.Item
fz={12}
@@ -109,6 +120,17 @@ export const ToolsMenu = () => {
<Menu.Item fz={12} leftSection={<FaRandom />} onClick={randomizeData}>
Randomize Data
</Menu.Item>
+ <Menu.Item
+ fz={12}
+ leftSection={<MdCompare />}
+ rightSection={<VscLock />}
+ onClick={() => {
+ setVisible("upgrade")(true);
+ gaEvent("Tools Menu", "open", "Compare Data");
+ }}
+ >
+ Compare Data
+ </Menu.Item>
</Menu.Dropdown>
</Menu>
);
diff --git a/src/containers/Toolbar/index.tsx b/src/containers/Toolbar/index.tsx
index 3f1bc176..a58aa6f8 100644
--- a/src/containers/Toolbar/index.tsx
+++ b/src/containers/Toolbar/index.tsx
@@ -1,10 +1,10 @@
import React from "react";
-import { Text, Flex, Group, Select, Indicator } from "@mantine/core";
+import { Text, Flex, Group, Select, Indicator, ThemeIcon } from "@mantine/core";
import { useLocalStorage } from "@mantine/hooks";
import toast from "react-hot-toast";
import { AiOutlineFullscreen } from "react-icons/ai";
+import { FaGift } from "react-icons/fa6";
import { FiDownload } from "react-icons/fi";
-import { MdStars } from "react-icons/md";
import { SearchInput } from "src/containers/Toolbar/SearchInput";
import { FileFormat } from "src/enums/file.enum";
import { JSONCrackLogo } from "src/layout/JsonCrackLogo";
@@ -89,9 +89,11 @@ export const Toolbar = ({ isWidget = false }: ToolbarProps) => {
gaEvent("Toolbar", "click upgrade premium");
}}
>
- <MdStars color="#1aa853" size="16" />
- <Text c="#1aa853" fw={800} fz="xs">
- Upgrade
+ <ThemeIcon size="xs" variant="transparent" color="red">
+ <FaGift size="12" />
+ </ThemeIcon>
+ <Text c="red" fw={600} fz="xs">
+ Limited Offer
</Text>
</Styles.StyledToolElement>
</Indicator>
diff --git a/src/layout/ModalController.tsx b/src/layout/ModalController.tsx
index 531e57f1..69aa08aa 100644
--- a/src/layout/ModalController.tsx
+++ b/src/layout/ModalController.tsx
@@ -21,6 +21,7 @@ const modalComponents: ModalComponent[] = [
{ key: "review", component: Modals.ReviewModal },
{ key: "jq", component: Modals.JQModal },
{ key: "type", component: Modals.TypeModal },
+ { key: "jpath", component: Modals.JPathModal },
];
const ModalController = () => {
diff --git a/src/store/useModal.ts b/src/store/useModal.ts
index 2650f034..a93c42b3 100644
--- a/src/store/useModal.ts
+++ b/src/store/useModal.ts
@@ -25,6 +25,7 @@ const initialStates: ModalState = {
review: false,
jq: false,
type: false,
+ jpath: false,
};
const authModals: Modal[] = ["cloud", "account"];