diff --git a/pages/search/components/Filters/constants.ts b/pages/search/components/Filters/constants.ts new file mode 100644 index 0000000..2f4faa2 --- /dev/null +++ b/pages/search/components/Filters/constants.ts @@ -0,0 +1,27 @@ +export const LANGUAGE_ITEMS = [ + { value: 'All EU', label: 'All EU' }, + { value: 'Bulgarian', label: 'Bulgarian' }, + { value: 'Croatian', label: 'Croatian' }, + { value: 'Czech', label: 'Czech' }, + { value: 'Danish', label: 'Danish' }, + { value: 'Dutch', label: 'Dutch' }, + { value: 'English', label: 'English' }, + { value: 'Estonian', label: 'Estonian' }, + { value: 'Finnish', label: 'Finnish' }, + { value: 'French', label: 'French' }, + { value: 'German', label: 'German' }, + { value: 'Greek', label: 'Greek' }, + { value: 'Hungarian', label: 'Hungarian' }, + { value: 'Irish', label: 'Irish' }, + { value: 'Italian', label: 'Italian' }, + { value: 'Latvian', label: 'Latvian' }, + { value: 'Lithuanian', label: 'Lithuanian' }, + { value: 'Maltese', label: 'Maltese' }, + { value: 'Polish', label: 'Polish' }, + { value: 'Portuguese', label: 'Portuguese' }, + { value: 'Romanian', label: 'Romanian' }, + { value: 'Slovak', label: 'Slovak' }, + { value: 'Slovenian', label: 'Slovenian' }, + { value: 'Spanish', label: 'Spanish' }, + { value: 'Swedish', label: 'Swedish' }, +] diff --git a/pages/search/components/Filters/index.tsx b/pages/search/components/Filters/index.tsx index 7173891..b506b57 100644 --- a/pages/search/components/Filters/index.tsx +++ b/pages/search/components/Filters/index.tsx @@ -5,35 +5,7 @@ import Toggle from 'react-toggle' import 'react-datepicker/dist/react-datepicker.css' import './Filters.css' import CustomDatePicker from '../CustomDatePicker' - -// TODO get these items from DB? -const LANGUAGE_ITEMS = [ - { value: 'All EU', label: 'All EU' }, - { value: 'Bulgarian', label: 'Bulgarian' }, - { value: 'Croatian', label: 'Croatian' }, - { value: 'Czech', label: 'Czech' }, - { value: 'Danish', label: 'Danish' }, - { value: 'Dutch', label: 'Dutch' }, - { value: 'English', label: 'English' }, - { value: 'Estonian', label: 'Estonian' }, - { value: 'Finnish', label: 'Finnish' }, - { value: 'French', label: 'French' }, - { value: 'German', label: 'German' }, - { value: 'Greek', label: 'Greek' }, - { value: 'Hungarian', label: 'Hungarian' }, - { value: 'Irish', label: 'Irish' }, - { value: 'Italian', label: 'Italian' }, - { value: 'Latvian', label: 'Latvian' }, - { value: 'Lithuanian', label: 'Lithuanian' }, - { value: 'Maltese', label: 'Maltese' }, - { value: 'Polish', label: 'Polish' }, - { value: 'Portuguese', label: 'Portuguese' }, - { value: 'Romanian', label: 'Romanian' }, - { value: 'Slovak', label: 'Slovak' }, - { value: 'Slovenian', label: 'Slovenian' }, - { value: 'Spanish', label: 'Spanish' }, - { value: 'Swedish', label: 'Swedish' }, -] +import { LANGUAGE_ITEMS } from './constants' const Filters = ({ languageValues, @@ -60,7 +32,7 @@ const Filters = ({ } return ( -
+