import React, { useMemo } from 'react'; import { AllTechnologiesPicker } from './all_technologies_picker/all_technologies_picker'; import { SelectedTechnologies } from './selected_technologies/selected_technologies'; import { DevTechnology, Technology } from './technologies/technology'; import { ContextType, TechnologiesPickerContext } from './technologies_picker_context'; export interface TechnologiesPickerProps { classes?: { container?: string }; isMobile?: boolean; selectedValues: Array; onAddItem: (technoName: string) => void; onDeleteItem: (technoName: string) => void; onArrayChange: (newArray: Array) => void; onArrayItemChange: (item: DevTechnology) => void; technologies: Technology[]; translations: ContextType['translations']; content?: { noResults?: React.ReactElement; additionalInformations?: React.ReactElement; }; hideSlider?: boolean; } export const TechnologiesPicker: React.FC = ({ isMobile, selectedValues = [], onAddItem, onDeleteItem, onArrayChange, onArrayItemChange, technologies, classes = {}, translations, content, hideSlider = false, }) => { // const classes = useStyles({ classes: receivedClasses, isMobile }); const technoPickerContext = useMemo( () => ({ technologies, translations, }), [technologies, translations] ); return (
{!isMobile &&
} {!isMobile && (
{content?.additionalInformations}
)}
); };