aboutsummaryrefslogtreecommitdiffstats
path: root/apps/Notes/hooks/useSort.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/Notes/hooks/useSort.js')
-rw-r--r--apps/Notes/hooks/useSort.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/Notes/hooks/useSort.js b/apps/Notes/hooks/useSort.js
index 78c01b4..e3cf230 100644
--- a/apps/Notes/hooks/useSort.js
+++ b/apps/Notes/hooks/useSort.js
@@ -1,12 +1,12 @@
-import {useState} from 'react'
-import {faSortAmountDown, faSortAmountUp} from '@fortawesome/free-solid-svg-icons'
-import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'
+import { useState } from 'react'
+import { faSortAmountDown, faSortAmountUp } from '@fortawesome/free-solid-svg-icons'
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
const useSort = (d) => {
const [sort, setSort] = useState(d)
- const sortedBy = s => Math.abs(sort) === s && <FontAwesomeIcon icon={sort>0 ? faSortAmountDown : faSortAmountUp} />
- const sortBy = s => sort === s ? setSort(-1*s) : setSort(s)
+ const sortedBy = s => Math.abs(sort) === s && <FontAwesomeIcon icon={sort > 0 ? faSortAmountDown : faSortAmountUp} />
+ const sortBy = s => sort === s ? setSort(-1 * s) : setSort(s)
const sortFn = (a, b) => {
const d = sort > 0 ? 1 : -1
switch (Math.abs(sort)) {