Skip to content

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

fix: conditionally render ToDiagram link based on external mode setting

AykutSarac724bee35ebc6
diff --git a/apps/www/src/features/editor/Toolbar/index.tsx b/apps/www/src/features/editor/Toolbar/index.tsx
index 590d3e5b..f328f8bc 100644
--- a/apps/www/src/features/editor/Toolbar/index.tsx
+++ b/apps/www/src/features/editor/Toolbar/index.tsx
@@ -74,13 +74,15 @@ export const Toolbar = () => {
<ToolsMenu />
</Group>
<Group gap="xs" justify="right" w="100%" style={{ flexWrap: "nowrap" }}>
- <StyledToDiagramLink
- href="https://todiagram.com/editor?utm_source=jsoncrack&utm_medium=toolbar"
- target="_blank"
- rel="noopener"
- >
- Upgrade to Pro Editor <TbExternalLink size={14} />
- </StyledToDiagramLink>
+ {process.env.NEXT_PUBLIC_DISABLE_EXTERNAL_MODE !== "true" && (
+ <StyledToDiagramLink
+ href="https://todiagram.com/editor?utm_source=jsoncrack&utm_medium=toolbar"
+ target="_blank"
+ rel="noopener"
+ >
+ Upgrade to Pro Editor <TbExternalLink size={14} />
+ </StyledToDiagramLink>
+ )}
<ThemeToggle />
<Link href="https://github.com/AykutSarac/jsoncrack.com" rel="noopener" target="_blank">
<StyledToolElement title="GitHub">