Refractor

This commit is contained in:
gowarezzz
2021-08-19 09:50:38 +07:00
parent 0e7e7b7d5f
commit 0f82dfdcba
441 changed files with 191 additions and 81002 deletions

View File

@@ -55,13 +55,10 @@ export default function FocusTrap({ children, focusFirst = false }: Props) {
}
}, [root, children])
return React.createElement(
'div',
{
ref: root,
className: 'outline-none focus-trap',
tabIndex: -1,
},
children
)
return React.createElement('div', {
ref: root,
children,
className: 'outline-none focus-trap',
tabIndex: -1,
})
}

View File

@@ -18,10 +18,10 @@ export function useSearchMeta(asPath: string) {
c = parts[4]
}
if (path !== pathname) setPathname(path)
setPathname(path)
if (c !== category) setCategory(c)
if (b !== brand) setBrand(b)
}, [asPath, pathname, category, brand])
}, [asPath])
return { pathname, category, brand }
}