Skip to content

Commit

Permalink
fix: swap send button with response section and refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgenii Fedoseev committed Feb 28, 2024
1 parent 9d270e0 commit 6404f31
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/runtime/components/BodyFormData.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import {Text, TextArea} from '@gravity-ui/uikit';
import {JSONSchema6Definition} from 'json-schema';

import {Text as TextEnum} from '../../plugin/constants';
import {OpenJSONSchema} from '../../includer/models';
import { JSONSchema6Definition } from 'json-schema';

import type {Field, Nullable} from '../types';
import {Column} from './Column';
Expand Down
8 changes: 4 additions & 4 deletions src/runtime/components/FileInputArray.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const FileInputArray: React.FC<Props> = ({onChange}) => {
setInputs((oldState) => {
const file = event.target.files?.[0];
const nextState = {...oldState, [idWithChange]: file }

Check failure on line 22 in src/runtime/components/FileInputArray.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

Replace `·}` with `};`

onChange(Object.values(nextState).filter(isFile));

return nextState;
Expand All @@ -35,10 +35,10 @@ export const FileInputArray: React.FC<Props> = ({onChange}) => {

const createOnRemove = useCallback(
(idForRemove: number) => () => {
setInputs((OldState) => {
delete OldState[idForRemove];
setInputs((oldState) => {
delete oldState[idForRemove];

return OldState;
return oldState;
});
},
[setInputs],
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/sandbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ export const Sandbox: React.FC<SandboxProps> = (props) => {
example={props.body}
bodyType={props.bodyType}
/>
{request && <Result request={request} />}
<div>
<Button size="l" view="action" type="submit">
{Text.BUTTON_SUBMIT}
</Button>
</div>
{request && <Result request={request} />}
</Column>
</form>
);
Expand Down

0 comments on commit 6404f31

Please sign in to comment.