fix comments

Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev>
This commit is contained in:
Vincenzo Scamporlino
2021-09-10 15:05:09 +02:00
parent f6188773a5
commit 7bd1a87e15
@@ -14,7 +14,6 @@
* limitations under the License.
*/
import React, { useState } from 'react';
import { MemoryRouter } from 'react-router';
import { SearchType } from '../index';
import { SearchContext } from '../SearchContext';
@@ -30,15 +29,8 @@ export const Default = () => {
const [types, setTypes] = useState<string[]>([]);
return (
<MemoryRouter>
{/* @ts-ignore (value requires more than what is used here) */}
<SearchContext.Provider value={{ types, setTypes }}>
<SearchType
name="Search type"
values={values}
defaultValue={values[0]}
/>
</SearchContext.Provider>
</MemoryRouter>
<SearchContext.Provider value={{ types, setTypes } as any}>
<SearchType name="Search type" values={values} defaultValue={values[0]} />
</SearchContext.Provider>
);
};