const ownerId = "contribut3.near"; const urlProps = props.urlProps ?? {}; const getFilters = () => { return [ "vertical", "readiness", "size", "integration", "dev", "stage", "distribution", ].reduce( (acc, key) => urlProps[key] ? Object.assign(acc, { [key]: new Set(urlProps[key].split(",")), }) : acc, {} ); }; return ( <Widget src={`${ownerId}/widget/Inputs.Filters`} props={{ urlFilters: getFilters(), search: urlProps.q, }} /> );