Skip to content

Commit 7954baf

Browse files
committed
Fix yarn tsc errors
1 parent deac4f3 commit 7954baf

File tree

3 files changed

+7
-22
lines changed

3 files changed

+7
-22
lines changed

packages/app/src/App.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,6 @@ const app = createApp({
7979
},
8080
});
8181

82-
/**
83-
* 2024-02-13 - The version of TechDocsAddons that Backstage ships with makes
84-
* the TypeScript compiler complain when you try to render it as JSX. This seems
85-
* like it's just a type mismatch issue, and things still work at runtime
86-
*/
87-
const FixedTechDocsAddons = TechDocsAddons as React.FC<unknown>;
88-
8982
const routes = (
9083
<FlatRoutes>
9184
<Route path="/" element={<Navigate to="catalog" />} />
@@ -101,9 +94,9 @@ const routes = (
10194
path="/docs/:namespace/:kind/:name/*"
10295
element={<TechDocsReaderPage />}
10396
>
104-
<FixedTechDocsAddons>
97+
<TechDocsAddons>
10598
<ReportIssue />
106-
</FixedTechDocsAddons>
99+
</TechDocsAddons>
107100
</Route>
108101
<Route path="/create" element={<ScaffolderPage />} />
109102
<Route path="/api-docs" element={<ApiExplorerPage />} />

packages/app/src/components/catalog/EntityPage.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,11 @@ import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';
6060

6161
import { CoderWorkspacesCard } from '@coder/backstage-plugin-coder';
6262

63-
/**
64-
* 2024-02-13 - The version of TechDocsAddons that Backstage ships with makes
65-
* the TypeScript compiler complain when you try to render it as JSX. This seems
66-
* like it's just a type mismatch issue, and things still work at runtime
67-
*/
68-
const FixedTechDocsAddons = TechDocsAddons as React.FC<unknown>;
69-
7063
const techdocsContent = (
7164
<EntityTechdocsContent>
72-
<FixedTechDocsAddons>
65+
<TechDocsAddons>
7366
<ReportIssue />
74-
</FixedTechDocsAddons>
67+
</TechDocsAddons>
7568
</EntityTechdocsContent>
7669
);
7770

plugins/backstage-plugin-coder/src/components/CoderErrorBoundary/CoderErrorBoundary.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, {
22
type ErrorInfo,
3-
type FC,
43
type ReactNode,
54
Component,
65
} from 'react';
@@ -39,7 +38,7 @@ class ErrorBoundaryCore extends Component<
3938
}
4039

4140
componentDidCatch(error: Error, errorInfo: ErrorInfo): void {
42-
this.props.onError(error, errorInfo.componentStack);
41+
this.props.onError(error, errorInfo.componentStack || "no details");
4342
}
4443

4544
render() {
@@ -53,10 +52,10 @@ type CoderErrorBoundaryProps = {
5352
fallbackUi?: ReactNode;
5453
};
5554

56-
export const CoderErrorBoundary: FC<CoderErrorBoundaryProps> = ({
55+
export const CoderErrorBoundary = ({
5756
children,
5857
fallbackUi,
59-
}) => {
58+
}: CoderErrorBoundaryProps) => {
6059
const errorApi = useApi(errorApiRef);
6160
const fallbackContent = fallbackUi ?? <FallbackUi />;
6261

0 commit comments

Comments
 (0)