-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
197 changed files
with
5,566 additions
and
5,560 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"printWidth": 100, | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"jsxSingleQuote": false, | ||
"bracketSameLine": false, | ||
"arrowParens": "always" | ||
} |
20 changes: 7 additions & 13 deletions
20
services/app/apps/codebattle/assets/js/__mocks__/react-select.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,26 @@ | ||
import React, { useState } from 'react'; | ||
|
||
const Select = ({ options, onChange, filterOption }) => { | ||
function Select({ filterOption, onChange, options }) { | ||
const [selectInput, setSelectInput] = useState('task'); | ||
|
||
return ( | ||
<div> | ||
{options | ||
.filter(option => ( | ||
filterOption({ value: { name: option.value.name } }, selectInput) | ||
)) | ||
.map(option => ( | ||
.filter((option) => filterOption({ value: { name: option.value.name } }, selectInput)) | ||
.map((option) => ( | ||
<button | ||
key={option.value.name} | ||
type="button" | ||
onClick={() => onChange({ value: option.value })} | ||
key={option.value.name} | ||
> | ||
{option.value.name} | ||
</button> | ||
))} | ||
<button | ||
type="button" | ||
onClick={() => setSelectInput('nAme')} | ||
key="filterOption" | ||
> | ||
))} | ||
<button key="filterOption" type="button" onClick={() => setSelectInput('nAme')}> | ||
filter tasks by name | ||
</button> | ||
</div> | ||
); | ||
}; | ||
} | ||
|
||
export default Select; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.