From c1c24f429fc8dd8c27871c8d9c45c1a934f8b88b Mon Sep 17 00:00:00 2001
From: Yuval Adam <_@yuv.al>
Date: Mon, 10 Mar 2025 11:26:42 +0100
Subject: Remove dynamic canonical

---
 src/pages/chart/ChartEmbedPage.tsx | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

(limited to 'src/pages/chart/ChartEmbedPage.tsx')

diff --git a/src/pages/chart/ChartEmbedPage.tsx b/src/pages/chart/ChartEmbedPage.tsx
index 4b485b7..2034f2c 100644
--- a/src/pages/chart/ChartEmbedPage.tsx
+++ b/src/pages/chart/ChartEmbedPage.tsx
@@ -18,19 +18,16 @@ const ChartEmbedPage = () => {
     viewportMeta.name = 'viewport';
     viewportMeta.content = 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no';
     document.head.appendChild(viewportMeta);
-    
-    // Set canonical URL
-    const canonicalLink = document.createElement('link');
-    canonicalLink.rel = 'canonical';
-    canonicalLink.href = 'https://morsehero.com/charts/embed';
-    document.head.appendChild(canonicalLink);
-    
+
     // Set page title
     document.title = 'Morse Code Chart | Embed';
-    
+
     return () => {
-      document.head.removeChild(viewportMeta);
-      document.head.removeChild(canonicalLink);
+      // Remove viewport meta tag when component unmounts
+      const metaTag = document.querySelector('meta[name="viewport"]');
+      if (metaTag && metaTag.parentNode) {
+        metaTag.parentNode.removeChild(metaTag);
+      }
     };
   }, []);
 
-- 
cgit v1.3.1

