From badb2c029d114371e9c01877c3746344f05c8b5d Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Tue, 24 Jan 2023 01:26:01 +0400 Subject: [PATCH] Refactor the topic loading --- src/components/FrameRenderer/FrameRenderer.astro | 9 ++------- src/components/FrameRenderer/renderer.js | 5 ----- .../TopicOverlay.astro | 2 ++ .../{FrameRenderer => TopicOverlay}/topic.js | 4 ++++ src/pages/[roadmapId]/index.astro | 12 ++++++------ src/pages/best-practices/[bestPracticeId].astro | 4 +++- 6 files changed, 17 insertions(+), 19 deletions(-) rename src/components/{FrameRenderer => TopicOverlay}/TopicOverlay.astro (98%) rename src/components/{FrameRenderer => TopicOverlay}/topic.js (98%) diff --git a/src/components/FrameRenderer/FrameRenderer.astro b/src/components/FrameRenderer/FrameRenderer.astro index 949f7ee97..fb90eb446 100644 --- a/src/components/FrameRenderer/FrameRenderer.astro +++ b/src/components/FrameRenderer/FrameRenderer.astro @@ -1,12 +1,10 @@ --- import Loader from '../Loader.astro'; -import ShareIcons from '../ShareIcons/ShareIcons.astro'; -import TopicOverlay from './TopicOverlay.astro'; +import TopicOverlay from '../TopicOverlay/TopicOverlay.astro'; import './FrameRenderer.css'; export interface Props { roadmapId: string; - description: string; jsonUrl: string; dimensions?: { width: number; @@ -14,12 +12,9 @@ export interface Props { }; } -const { roadmapId, jsonUrl, dimensions = null, description } = Astro.props; +const { roadmapId, jsonUrl, dimensions = null } = Astro.props; --- - - -
+ +