From b602996c791d6bf2024ebc9cbd1b2319158ddba3 Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Mon, 2 Dec 2024 17:57:05 -0300 Subject: [PATCH] Remove unused user context from NewIncidentPage component --- site/gatsby-site/src/pages/incidents/new.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/site/gatsby-site/src/pages/incidents/new.js b/site/gatsby-site/src/pages/incidents/new.js index 8825ad569c..186a7c3d29 100644 --- a/site/gatsby-site/src/pages/incidents/new.js +++ b/site/gatsby-site/src/pages/incidents/new.js @@ -3,11 +3,7 @@ import IncidentForm, { schema } from '../../components/incidents/IncidentForm'; import useToastContext, { SEVERITY } from '../../hooks/useToast'; import { NumberParam, useQueryParam, withDefault } from 'use-query-params'; import { Button, Spinner } from 'flowbite-react'; -import { - FIND_INCIDENT, - GET_LATEST_INCIDENT_ID, - INSERT_INCIDENT, -} from '../../graphql/incidents'; +import { FIND_INCIDENT, GET_LATEST_INCIDENT_ID, INSERT_INCIDENT } from '../../graphql/incidents'; import { FIND_ENTITIES, UPSERT_ENTITY } from '../../graphql/entities'; import { useMutation, useQuery } from '@apollo/client/react/hooks'; import { Formik } from 'formik'; @@ -15,14 +11,10 @@ import { LocalizedLink, useLocalization } from 'plugins/gatsby-theme-i18n'; import { useTranslation, Trans } from 'react-i18next'; import { processEntities } from '../../utils/entities'; import DefaultSkeleton from 'elements/Skeletons/Default'; -import { useUserContext } from '../../contexts/userContext'; -import { getUnixTime } from 'date-fns'; function NewIncidentPage() { const [incidentIdToClone] = useQueryParam('incident_id', withDefault(NumberParam, 0)); - const { user } = useUserContext(); - const { t, i18n } = useTranslation(); const { data: incidentToCloneData, loading: loadingIncidentToClone } = useQuery(FIND_INCIDENT, {