Skip to content

Commit

Permalink
Remove unnecessary spread
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongarciah committed Jun 20, 2024
1 parent 66662fa commit ecf5a54
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function UseAutocomplete() {
{groupedOptions.length > 0 ? (
<Listbox {...getListboxProps()}>
{groupedOptions.map((option, index) => {
const { key, ...optionProps } = { ...getOptionProps({ option, index }) };
const { key, ...optionProps } = getOptionProps({ option, index });
return (
<li key={key} {...optionProps}>
{option.title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function UseAutocomplete() {
{groupedOptions.length > 0 ? (
<Listbox {...getListboxProps()}>
{(groupedOptions as typeof top100Films).map((option, index) => {
const { key, ...optionProps } = { ...getOptionProps({ option, index }) };
const { key, ...optionProps } = getOptionProps({ option, index });
return (
<li key={key} {...optionProps}>
{option.title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{groupedOptions.length > 0 ? (
<Listbox {...getListboxProps()}>
{(groupedOptions as typeof top100Films).map((option, index) => {
const { key, ...optionProps } = { ...getOptionProps({ option, index }) };
const { key, ...optionProps } = getOptionProps({ option, index });
return (
<li key={key} {...optionProps}>
{option.title}
Expand Down

0 comments on commit ecf5a54

Please sign in to comment.