From 64ebeb6026846ec082d6e169345c1f8c75c69e37 Mon Sep 17 00:00:00 2001 From: Brent Sharrow Date: Fri, 18 Jun 2021 11:45:59 -0500 Subject: [PATCH] Update code block in quickstart-app-plugin tutorial to use named import. Signed-off-by: Brent Sharrow --- .../tutorials/quickstart-app-plugin/ExampleFetchComponent.md | 4 +--- docs/tutorials/quickstart-app-plugin.md | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/contrib/docs/tutorials/quickstart-app-plugin/ExampleFetchComponent.md b/contrib/docs/tutorials/quickstart-app-plugin/ExampleFetchComponent.md index 6992d05866..262330119e 100644 --- a/contrib/docs/tutorials/quickstart-app-plugin/ExampleFetchComponent.md +++ b/contrib/docs/tutorials/quickstart-app-plugin/ExampleFetchComponent.md @@ -76,7 +76,7 @@ export const DenseTable = ({ viewer }: DenseTableProps) => { ); }; -const ExampleFetchComponent = () => { +export const ExampleFetchComponent = () => { const auth = useApi(githubAuthApiRef); const { value, loading, error } = useAsync(async (): Promise => { @@ -106,6 +106,4 @@ const ExampleFetchComponent = () => { /> ); }; - -export default ExampleFetchComponent; ``` diff --git a/docs/tutorials/quickstart-app-plugin.md b/docs/tutorials/quickstart-app-plugin.md index 7dca90c14b..99ba55c19d 100644 --- a/docs/tutorials/quickstart-app-plugin.md +++ b/docs/tutorials/quickstart-app-plugin.md @@ -146,11 +146,9 @@ import { } from '@backstage/core'; import { graphql } from '@octokit/graphql'; -const ExampleFetchComponent = () => { +export const ExampleFetchComponent = () => { return
Nothing to see yet
; }; - -export default ExampleFetchComponent; ``` 3. Save that and ensure you see no errors. Comment out the unused imports if