From c4b133f4f3c4650c861a46181772d937c2c3e0e3 Mon Sep 17 00:00:00 2001 From: Arpit Kuriyal Date: Thu, 14 Nov 2024 15:43:53 +0530 Subject: [PATCH 1/2] hide edit this on github --- _includes/community | 2 +- components/DocsHelp.tsx | 7 ++++--- pages/tools/index.page.tsx | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/_includes/community b/_includes/community index 06eb0ef74..93f841dc3 160000 --- a/_includes/community +++ b/_includes/community @@ -1 +1 @@ -Subproject commit 06eb0ef7410a7eb345311e5ef7438e83423dd51a +Subproject commit 93f841dc3181a0d643294f0d994cc515ed381cb0 diff --git a/components/DocsHelp.tsx b/components/DocsHelp.tsx index 544189b77..c4971fa55 100644 --- a/components/DocsHelp.tsx +++ b/components/DocsHelp.tsx @@ -4,9 +4,10 @@ import extractPathWithoutFragment from '~/lib/extractPathWithoutFragment'; interface DocsHelpProps { markdownFile?: string; + isVisible: boolean } -export function DocsHelp({ markdownFile }: DocsHelpProps) { +export function DocsHelp({ markdownFile,isVisible=true}: DocsHelpProps) { const router = useRouter(); const path = encodeURIComponent(router.pathname); const [isFormOpen, setIsFormOpen] = useState(false); @@ -296,7 +297,7 @@ export function DocsHelp({ markdownFile }: DocsHelpProps) { type of contribution!

-
+ {isVisible ? (
Edit this page on Github -
+
): null}
- +
From 71e2039f6a09f74b91ee23e70035ad2350407057 Mon Sep 17 00:00:00 2001 From: Arpit Kuriyal Date: Thu, 14 Nov 2024 16:08:25 +0530 Subject: [PATCH 2/2] lint correction --- components/DocsHelp.tsx | 48 ++++++++++++++++++++------------------ pages/tools/index.page.tsx | 2 +- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/components/DocsHelp.tsx b/components/DocsHelp.tsx index c4971fa55..9df4e2b84 100644 --- a/components/DocsHelp.tsx +++ b/components/DocsHelp.tsx @@ -4,10 +4,10 @@ import extractPathWithoutFragment from '~/lib/extractPathWithoutFragment'; interface DocsHelpProps { markdownFile?: string; - isVisible: boolean + isVisible?: boolean; } -export function DocsHelp({ markdownFile,isVisible=true}: DocsHelpProps) { +export function DocsHelp({ markdownFile, isVisible = true }: DocsHelpProps) { const router = useRouter(); const path = encodeURIComponent(router.pathname); const [isFormOpen, setIsFormOpen] = useState(false); @@ -297,28 +297,30 @@ export function DocsHelp({ markdownFile,isVisible=true}: DocsHelpProps) { type of contribution!

- {isVisible ? (
- - - Edit this page on Github - -
): null} + + Edit this page on Github + + + ) : null}
- +