Skip to content

Commit

Permalink
Remove unnecessary empty JSX fragments from various components
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamik10 committed Jan 6, 2025
1 parent 5b7566a commit 7448b5f
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion src/apps/material-search/MaterialSearch.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ const MaterialSearchHiddenInputs = ({
/>
</label>
</div>
{}
<MaterialSearch uniqueIdentifier={uniqueIdentifier} {...args} />
</div>
);
Expand Down
1 change: 0 additions & 1 deletion src/apps/search-header/search-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ const SearchHeader: React.FC = () => {
return (
<div className="header__menu-second">
{/* The downshift combobox uses prop spreading by design */}
{}
<div className="header__menu-search">
<SearchBar
q={q}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const AutosuggestCategory: FC<AutosuggestCategoryProps> = ({
const t = useText();
return (
<>
{}
{/* The downshift combobox works this way by design (line 43) */}
{categoryData.map((item, incorrectIndex) => {
// incorrectIndex because in the whole of autosuggest dropdown it is
Expand Down
2 changes: 0 additions & 2 deletions src/components/autosuggest-material/autosuggest-material.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const AutosuggestMaterial: React.FC<AutosuggestMaterialProps> = ({
const t = useText();
return (
<>
{}
{/* The downshift combobox works this way by design (line 54) */}
{materialData.map((item, incorrectIndex) => {
// incorrectIndex because in the whole of autosuggest dropdown it is
Expand Down Expand Up @@ -71,7 +70,6 @@ const AutosuggestMaterial: React.FC<AutosuggestMaterialProps> = ({
{...getItemProps({ item, index })}
data-cy={dataCy}
>
{}
<div className="autosuggest__material-card">
<Cover
animate
Expand Down
2 changes: 0 additions & 2 deletions src/components/autosuggest-text/autosuggest-text-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const AutosuggestTextItem: React.FC<AutosuggestTextItemProps> = ({
const t = useText();
return (
<>
{}
{/* The downshift combobox works this way by design */}
<li
className={classes.textSuggestion}
Expand All @@ -43,7 +42,6 @@ const AutosuggestTextItem: React.FC<AutosuggestTextItemProps> = ({
lang={isoLang}
>
<p className="autosuggest__text text-body-medium-regular">
{}
{item.type === SuggestionTypeEnum.Creator
? `${item.term} (${t("stringSuggestionAuthorText")})`
: null}
Expand Down
3 changes: 0 additions & 3 deletions src/components/autosuggest/autosuggest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,13 @@ export const Autosuggest: React.FC<AutosuggestProps> = ({

return (
<>
{}
{/* The downshift combobox works this way by design */}
<ul
className="autosuggest pb-16"
{...getMenuProps()}
style={!isOpen ? { display: "none" } : {}}
data-cy={dataCy}
>
{}

<AutosuggestText
textData={textData}
highlightedIndex={highlightedIndex}
Expand Down
1 change: 0 additions & 1 deletion src/components/find-on-shelf/FindOnShelfModal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ const meta: Meta<typeof WrappedFindOnShelfModal> = {
size="small"
faustIds={[convertPostIdToFaustId(pid)]}
/>
{}
<WrappedFindOnShelfModal {...modifiedArgs} />
</>
);
Expand Down
1 change: 0 additions & 1 deletion src/components/material/ReviewInfomedia.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ const ReviewInfomedia: React.FC<ReviewInfomediaProps> = ({
)}
{/* We consider infomedia to be a trustworthy source & decided not to
sanitize the text data that we render as HTML. */}
{}
{infomedia.article?.text && (
<p
className="review__body mb-8"
Expand Down
2 changes: 0 additions & 2 deletions src/components/multiselect/Multiselect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ const Multiselect: FC<MultiselectProps> = ({
<>
{caption && <div className="multiselect__caption">{caption}</div>}
<div className="multiselect" ref={ref} data-cy={dataCy}>
{}
{/* The downshift combobox works this way by design */}
<button
type="button"
Expand Down Expand Up @@ -184,7 +183,6 @@ const Multiselect: FC<MultiselectProps> = ({
)
}
>
{}
<span id={`multiselect-label-${downshiftProps.id}`}>
{t(item.item)}
</span>
Expand Down
3 changes: 0 additions & 3 deletions src/components/search-bar/search-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ const SearchBar: React.FC<SearchBarProps> = ({
return (
<>
{/* The downshift combobox uses prop spreading by design & associated control is destructured too */}
{}
<label className="hide-visually" {...getLabelProps()}>
{t("searchHeaderInputLabelText")}
</label>
{}
<input
required
pattern=".*\S+.*"
Expand All @@ -72,7 +70,6 @@ const SearchBar: React.FC<SearchBarProps> = ({
}
})}
/>
{}
<input
type="image"
src={searchIcon}
Expand Down
2 changes: 0 additions & 2 deletions src/core/utils/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ function Modal({
<div>
{/* The backdrop doesn't have a role or keyboard listener because it barely duplicates
the close button's functionality which possesses both. */}
{}
<div
className="modal-backdrop"
style={{
Expand All @@ -104,7 +103,6 @@ function Modal({
close();
}}
/>
{}
<div
className={clsx(
"modal",
Expand Down

0 comments on commit 7448b5f

Please sign in to comment.