mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
apply prettier styles
This commit is contained in:
parent
64ad4f3f92
commit
bf04235dae
7130 changed files with 31393 additions and 37163 deletions
|
@ -82,7 +82,7 @@ export const CountUntil: React.FC<Props> = ({ fetchStreaming }) => {
|
|||
<EuiFieldNumber
|
||||
placeholder="Some integer"
|
||||
value={data}
|
||||
onChange={e => setData(Number(e.target.value))}
|
||||
onChange={(e) => setData(Number(e.target.value))}
|
||||
/>
|
||||
</EuiFormRow>
|
||||
<EuiButton type="submit" fill onClick={handleSubmit}>
|
||||
|
|
|
@ -49,18 +49,18 @@ export const DoubleIntegers: React.FC<Props> = ({ double }) => {
|
|||
setShowingResults(true);
|
||||
const nums = numbers
|
||||
.split('\n')
|
||||
.map(num => num.trim())
|
||||
.map((num) => num.trim())
|
||||
.filter(Boolean)
|
||||
.map(Number);
|
||||
counter.set(nums.length);
|
||||
nums.forEach(num => {
|
||||
nums.forEach((num) => {
|
||||
double({ num }).then(
|
||||
result => {
|
||||
(result) => {
|
||||
if (!isMounted()) return;
|
||||
counter.dec();
|
||||
pushResult({ num, result });
|
||||
},
|
||||
error => {
|
||||
(error) => {
|
||||
if (!isMounted()) return;
|
||||
counter.dec();
|
||||
pushResult({ num, error });
|
||||
|
@ -94,7 +94,7 @@ export const DoubleIntegers: React.FC<Props> = ({ double }) => {
|
|||
fullWidth
|
||||
placeholder="Enter numbers in milliseconds separated by new line"
|
||||
value={numbers}
|
||||
onChange={e => setNumbers(e.target.value)}
|
||||
onChange={(e) => setNumbers(e.target.value)}
|
||||
/>
|
||||
</EuiFormRow>
|
||||
<EuiButton type="submit" fill onClick={handleSubmit}>
|
||||
|
|
|
@ -30,7 +30,7 @@ export const App: React.FC = () => {
|
|||
const routeElements: React.ReactElement[] = [];
|
||||
for (const { items } of routes) {
|
||||
for (const { id, component } of items) {
|
||||
routeElements.push(<Route key={id} path={`/${id}`} render={props => component} />);
|
||||
routeElements.push(<Route key={id} path={`/${id}`} render={(props) => component} />);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ export const Sidebar: React.FC<SidebarProps> = () => {
|
|||
id,
|
||||
name: title,
|
||||
isSelected: true,
|
||||
items: items.map(route => ({
|
||||
items: items.map((route) => ({
|
||||
id: route.id,
|
||||
name: route.title,
|
||||
onClick: () => history.push(`/${route.id}`),
|
||||
|
|
|
@ -54,7 +54,7 @@ export class BfetchExplorerPlugin implements Plugin {
|
|||
// Validate inputs.
|
||||
if (num < 0) throw new Error('Invalid number');
|
||||
// Wait number of specified milliseconds.
|
||||
await new Promise(r => setTimeout(r, num));
|
||||
await new Promise((r) => setTimeout(r, num));
|
||||
// Double the number and send it back.
|
||||
return { num: 2 * num };
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue