From 1aae2480fbeb4b8aa554a776f44b1759ee4f4c4b Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Sun, 15 Aug 2021 11:51:55 -0700 Subject: [PATCH] run prettier --- components/Dropdown.js | 104 +++++++++++++++++++---------------------- components/hooks.js | 10 ++-- next.config.js | 10 +++- 3 files changed, 62 insertions(+), 62 deletions(-) diff --git a/components/Dropdown.js b/components/Dropdown.js index 71b7a39..a916862 100644 --- a/components/Dropdown.js +++ b/components/Dropdown.js @@ -58,16 +58,8 @@ class Dropdown extends React.PureComponent { userInputtedValue = '' render() { - const { - innerRef, - color, - selected, - onChange, - itemWrapper, - icon, - disableInput, - title, - } = this.props + const { innerRef, color, selected, onChange, itemWrapper, icon, disableInput, title } = + this.props const { itemsToShow, inputValue } = this.state const labelId = title ? `${title.toLowerCase()}-dropdown` : undefined @@ -98,51 +90,53 @@ class Dropdown extends React.PureComponent { } } -const renderDropdown = ({ color, list, itemWrapper, icon, disableInput, title, labelId }) => ({ - isOpen, - highlightedIndex, - selectedItem, - getRootProps, - getToggleButtonProps, - getInputProps, - getItemProps, -}) => { - return ( - - {title && {title}} - {icon} - - {selectedItem.name} - - {isOpen ? ( - - {list.map((item, index) => ( - - {item.name} - - ))} - - ) : null} - - ) -} +const renderDropdown = + ({ color, list, itemWrapper, icon, disableInput, title, labelId }) => + ({ + isOpen, + highlightedIndex, + selectedItem, + getRootProps, + getToggleButtonProps, + getInputProps, + getItemProps, + }) => { + return ( + + {title && {title}} + {icon} + + {selectedItem.name} + + {isOpen ? ( + + {list.map((item, index) => ( + + {item.name} + + ))} + + ) : null} + + ) + } const DropdownContainer = ({ children, innerRef, ...rest }) => { return ( diff --git a/components/hooks.js b/components/hooks.js index 47160d8..270346e 100644 --- a/components/hooks.js +++ b/components/hooks.js @@ -5,7 +5,7 @@ function userTiming({ category, status, value }) { window.gtag('event', status, { event_category: 'Performance', event_label: category, - value + value, }) } catch (err) { // pass @@ -20,7 +20,7 @@ export function usePerformanceMeasurement() { userTiming({ category: 'paint', status: entry.name, - value: entry.startTime + value: entry.startTime, }) }) const navigationTiming = window.performance.getEntriesByType('navigation') @@ -30,7 +30,7 @@ export function usePerformanceMeasurement() { userTiming({ category: 'paint', status: 'time to first byte', - value: navigationTiming.responseEnd - navigationTiming.requestStart + value: navigationTiming.responseEnd - navigationTiming.requestStart, }) } @@ -45,7 +45,7 @@ export function usePerformanceMeasurement() { userTiming({ category: 'javascript', status: 'script count', - value: javascriptFiles.length + value: javascriptFiles.length, }) /* @@ -55,7 +55,7 @@ export function usePerformanceMeasurement() { userTiming({ category: 'javascript', status: 'script size', - value: javascriptFiles.reduce((sum, script) => script.encodedBodySize + sum, 0) + value: javascriptFiles.reduce((sum, script) => script.encodedBodySize + sum, 0), }) } } catch (error) { diff --git a/next.config.js b/next.config.js index e161a1c..f94a712 100644 --- a/next.config.js +++ b/next.config.js @@ -18,10 +18,16 @@ module.exports = withBundleAnalyzer( use: [options.defaultLoaders.babel], }) config.plugins.push( - new options.webpack.IgnorePlugin({ resourceRegExp: /\.html$/, contextRegExp: /node_modules/ }) + new options.webpack.IgnorePlugin({ + resourceRegExp: /\.html$/, + contextRegExp: /node_modules/, + }) ) config.plugins.push( - new options.webpack.IgnorePlugin({ resourceRegExp: /\.css$/, contextRegExp: /node_modules/ }) + new options.webpack.IgnorePlugin({ + resourceRegExp: /\.css$/, + contextRegExp: /node_modules/, + }) ) return config