chore: fixing some typescripty things

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-09-12 10:49:14 +02:00
parent adfb075796
commit 7443c37ffc
2 changed files with 8 additions and 2 deletions
@@ -26,7 +26,7 @@ import {
} from '@backstage/integration-react';
import { scaffolderApiRef } from '../../../api';
import { ScaffolderApi } from '../../../types';
import validator from '@rjsf/validator-ajv6';
import {
SecretsContextProvider,
SecretsContext,
@@ -67,6 +67,7 @@ describe('RepoUrlPicker', () => {
>
<SecretsContextProvider>
<Form
validator={validator}
schema={{ type: 'string' }}
uiSchema={{ 'ui:field': 'RepoUrlPicker' }}
fields={{ RepoUrlPicker: RepoUrlPicker as Field<unknown> }}
@@ -103,6 +104,7 @@ describe('RepoUrlPicker', () => {
>
<SecretsContextProvider>
<Form
validator={validator}
schema={{ type: 'string' }}
uiSchema={{
'ui:field': 'RepoUrlPicker',
@@ -136,6 +138,7 @@ describe('RepoUrlPicker', () => {
>
<SecretsContextProvider>
<Form
validator={validator}
schema={{ type: 'string' }}
uiSchema={{
'ui:field': 'RepoUrlPicker',
@@ -62,7 +62,10 @@ export interface RepoUrlPickerUiOptions {
* @public
*/
export const RepoUrlPicker = (
props: FieldExtensionComponentProps<string, RepoUrlPickerUiOptions>,
props: FieldExtensionComponentProps<
string | undefined,
RepoUrlPickerUiOptions
>,
) => {
const { uiSchema, onChange, rawErrors, formData } = props;
const [state, setState] = useState<RepoUrlPickerState>(