Skip to content

Commit

Permalink
Remove unused user context from NewIncidentPage component
Browse files Browse the repository at this point in the history
  • Loading branch information
pdcp1 committed Dec 2, 2024
1 parent 0df6819 commit b602996
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions site/gatsby-site/src/pages/incidents/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,18 @@ 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';
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, {
Expand Down

0 comments on commit b602996

Please sign in to comment.