Skip to content

Database diagrams editor that allows you to visualize and design your DB with a single query.

add template url (#354)

Guy Ben-Aharone993476faddb
diff --git a/src/pages/template-page/template-page.tsx b/src/pages/template-page/template-page.tsx
index fd5ff27e..2eb2ad63 100644
--- a/src/pages/template-page/template-page.tsx
+++ b/src/pages/template-page/template-page.tsx
@@ -32,6 +32,7 @@ import { ReactFlowProvider } from '@xyflow/react';
import { ChartDBProvider } from '@/context/chartdb-context/chartdb-provider';
import { Helmet } from 'react-helmet-async';
import { APP_URL, HOST_URL } from '@/lib/env';
+import { Link } from '@/components/link/link';
export interface TemplatePageLoaderData {
template: Template | undefined;
@@ -246,6 +247,23 @@ const TemplatePageComponent: React.FC = () => {
</span>
</div>
</div>
+ <Separator />
+ {template.url ? (
+ <div>
+ <h4 className="mb-1 text-base font-semibold md:text-left">
+ Url
+ </h4>
+
+ <Link
+ className="break-all text-sm text-muted-foreground"
+ href={`${template.url}?ref=chartdb`}
+ target="_blank"
+ >
+ {template.url}
+ </Link>
+ </div>
+ ) : null}
+ <Separator />
<div>
<h4 className="mb-1 text-base font-semibold md:text-left">
Tags