From b6d140d7c23dac8a6ffacb5d6b8cf194e924de6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Wed, 19 Jun 2024 11:49:01 +0200 Subject: [PATCH] Change: Move useUserName hook to hooks directory --- src/web/components/menu/usermenu.jsx | 2 +- src/web/{utils => hooks}/__tests__/useUserName.jsx | 2 +- src/web/{utils => hooks}/useUserName.js | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/web/{utils => hooks}/__tests__/useUserName.jsx (94%) rename src/web/{utils => hooks}/useUserName.js (100%) diff --git a/src/web/components/menu/usermenu.jsx b/src/web/components/menu/usermenu.jsx index 9dfe3298da..eec18f550d 100644 --- a/src/web/components/menu/usermenu.jsx +++ b/src/web/components/menu/usermenu.jsx @@ -23,7 +23,7 @@ import Link from 'web/components/link/link'; import Theme from 'web/utils/theme'; import useGmp from 'web/utils/useGmp'; -import useUserName from 'web/utils/useUserName'; +import useUserName from 'web/hooks/useUserName'; import useUserSessionTimeout from 'web/utils/useUserSessionTimeout'; import useUserTimezone from 'web/utils/useUserTimezone'; diff --git a/src/web/utils/__tests__/useUserName.jsx b/src/web/hooks/__tests__/useUserName.jsx similarity index 94% rename from src/web/utils/__tests__/useUserName.jsx rename to src/web/hooks/__tests__/useUserName.jsx index f66cccfc96..a90d180fae 100644 --- a/src/web/utils/__tests__/useUserName.jsx +++ b/src/web/hooks/__tests__/useUserName.jsx @@ -7,7 +7,7 @@ import {describe, test, expect} from '@gsa/testing'; import {setUsername} from 'web/store/usersettings/actions'; -import {rendererWith, fireEvent} from '../testing'; +import {rendererWith, fireEvent} from 'web/utils/testing'; import useUserName from '../useUserName'; diff --git a/src/web/utils/useUserName.js b/src/web/hooks/useUserName.js similarity index 100% rename from src/web/utils/useUserName.js rename to src/web/hooks/useUserName.js