From ec2b6b9b4894e63cc7530bfc7b16d15f643277b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Wed, 19 Jun 2024 11:50:49 +0200 Subject: [PATCH] Change: Move useUserSessionTimeout hook to hooks directory --- src/web/components/menu/usermenu.jsx | 2 +- src/web/entities/BulkTags.jsx | 2 +- src/web/{utils => hooks}/__tests__/useUserSessionTimeout.jsx | 2 +- src/web/{utils => hooks}/useUserSessionTimeout.js | 0 src/web/pages/extras/cvssV4/CvssV4Calculator.jsx | 2 +- src/web/pages/extras/cvsscalculatorpage.jsx | 2 +- src/web/pages/portlists/listpage.jsx | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) rename src/web/{utils => hooks}/__tests__/useUserSessionTimeout.jsx (96%) rename src/web/{utils => hooks}/useUserSessionTimeout.js (100%) diff --git a/src/web/components/menu/usermenu.jsx b/src/web/components/menu/usermenu.jsx index eec18f550d..64d411423c 100644 --- a/src/web/components/menu/usermenu.jsx +++ b/src/web/components/menu/usermenu.jsx @@ -24,7 +24,7 @@ import Link from 'web/components/link/link'; import Theme from 'web/utils/theme'; import useGmp from 'web/utils/useGmp'; import useUserName from 'web/hooks/useUserName'; -import useUserSessionTimeout from 'web/utils/useUserSessionTimeout'; +import useUserSessionTimeout from 'web/hooks/useUserSessionTimeout'; import useUserTimezone from 'web/utils/useUserTimezone'; const UserMenu = styled.span` diff --git a/src/web/entities/BulkTags.jsx b/src/web/entities/BulkTags.jsx index 42e406d7da..8fcd855b30 100644 --- a/src/web/entities/BulkTags.jsx +++ b/src/web/entities/BulkTags.jsx @@ -14,7 +14,7 @@ import PropTypes from 'web/utils/proptypes'; import SelectionType from 'web/utils/selectiontype'; import useGmp from 'web/utils/useGmp'; -import useUserSessionTimeout from 'web/utils/useUserSessionTimeout'; +import useUserSessionTimeout from 'web/hooks/useUserSessionTimeout'; import TagDialog from 'web/pages/tags/dialog'; diff --git a/src/web/utils/__tests__/useUserSessionTimeout.jsx b/src/web/hooks/__tests__/useUserSessionTimeout.jsx similarity index 96% rename from src/web/utils/__tests__/useUserSessionTimeout.jsx rename to src/web/hooks/__tests__/useUserSessionTimeout.jsx index 89a7783522..75c9202378 100644 --- a/src/web/utils/__tests__/useUserSessionTimeout.jsx +++ b/src/web/hooks/__tests__/useUserSessionTimeout.jsx @@ -10,7 +10,7 @@ import date from 'gmp/models/date'; import {setSessionTimeout as setSessionTimeoutAction} from 'web/store/usersettings/actions'; -import {rendererWith, fireEvent} from '../testing'; +import {rendererWith, fireEvent} from 'web/utils/testing'; import useUserSessionTimeout from '../useUserSessionTimeout'; diff --git a/src/web/utils/useUserSessionTimeout.js b/src/web/hooks/useUserSessionTimeout.js similarity index 100% rename from src/web/utils/useUserSessionTimeout.js rename to src/web/hooks/useUserSessionTimeout.js diff --git a/src/web/pages/extras/cvssV4/CvssV4Calculator.jsx b/src/web/pages/extras/cvssV4/CvssV4Calculator.jsx index 74390f134f..c75584b8f3 100644 --- a/src/web/pages/extras/cvssV4/CvssV4Calculator.jsx +++ b/src/web/pages/extras/cvssV4/CvssV4Calculator.jsx @@ -15,7 +15,7 @@ import { removeUnusedMetrics, } from 'gmp/parser/cvssV4'; -import useUserSessionTimeout from 'web/utils/useUserSessionTimeout'; +import useUserSessionTimeout from 'web/hooks/useUserSessionTimeout'; import FormGroup from 'web/components/form/formgroup'; import Layout from 'web/components/layout/layout'; import Section from 'web/components/section/section'; diff --git a/src/web/pages/extras/cvsscalculatorpage.jsx b/src/web/pages/extras/cvsscalculatorpage.jsx index dc244821bb..a7e1b16102 100644 --- a/src/web/pages/extras/cvsscalculatorpage.jsx +++ b/src/web/pages/extras/cvsscalculatorpage.jsx @@ -34,7 +34,7 @@ import Divider from 'web/components/layout/divider'; import Section from 'web/components/section/section'; -import useUserSessionTimeout from 'web/utils/useUserSessionTimeout'; +import useUserSessionTimeout from 'web/hooks/useUserSessionTimeout'; import CvssV4Calculator from './cvssV4/CvssV4Calculator'; const StyledTextField = styled(TextField)` diff --git a/src/web/pages/portlists/listpage.jsx b/src/web/pages/portlists/listpage.jsx index f5593efdc1..65ac7964d7 100644 --- a/src/web/pages/portlists/listpage.jsx +++ b/src/web/pages/portlists/listpage.jsx @@ -12,7 +12,7 @@ import {PORTLISTS_FILTER_FILTER} from 'gmp/models/filter'; import {isDefined, hasValue} from 'gmp/utils/identity'; import useCapabilities from 'web/hooks/useCapabilities'; -import useUserSessionTimeout from 'web/utils/useUserSessionTimeout'; +import useUserSessionTimeout from 'web/hooks/useUserSessionTimeout'; import useGmp from 'web/utils/useGmp'; import usePageFilter from 'web/hooks/usePageFilter';