aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/hooks/index.ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-11-21 16:10:20 +0100
committerArmand Philippot <git@armandphilippot.com>2023-11-21 18:17:47 +0100
commitc6212f927daf3c928f479afa052e4772216a2d8a (patch)
tree6bb71d9cea03e110d10120ba4bf24e3a6f4ff7d0 /src/utils/hooks/index.ts
parent70b4f633a6fbedb58c8b9134ac64ede854d489de (diff)
refactor(components): replace items prop in Navbar component
* replace `items` prop with `children` prop: it is more readable this way, * handle navbar item state inside NavbarItem component: it avoid using three differents states and their methods to do exactly the same thing * remove useAutofocus hook since we can't use it anymore * add `onActivation` and `activationHandlerDelay` prop to NavbarItem component to be able to focus the search input only when the item is activated (it replicates the functioning of useAutofocus hook) * replace `ref` type in SearchForm component: it does not make sense to use an input ref for a form. Instead I use useImperativeHandle to provide different a focus method to the given ref.
Diffstat (limited to 'src/utils/hooks/index.ts')
-rw-r--r--src/utils/hooks/index.ts1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/utils/hooks/index.ts b/src/utils/hooks/index.ts
index 240a092..f3bfd75 100644
--- a/src/utils/hooks/index.ts
+++ b/src/utils/hooks/index.ts
@@ -1,6 +1,5 @@
export * from './use-ackee';
export * from './use-article';
-export * from './use-autofocus';
export * from './use-boolean';
export * from './use-breadcrumb';
export * from './use-comments';