From 38daa0f2a92c290e29c9b9fc218ca39806ab1255 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Thu, 30 May 2024 11:29:21 +0530 Subject: [PATCH] cleaned pgr code --- .../web/packages/pgr/src/pages/citizen/Create/index.js | 8 ++++---- .../packages/ui-libraries/src/hooks/pgr/useServiceDefs.js | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/micro-ui/web/packages/pgr/src/pages/citizen/Create/index.js b/micro-ui/web/packages/pgr/src/pages/citizen/Create/index.js index 740de4a682f..0b4f82a77b2 100644 --- a/micro-ui/web/packages/pgr/src/pages/citizen/Create/index.js +++ b/micro-ui/web/packages/pgr/src/pages/citizen/Create/index.js @@ -18,8 +18,8 @@ export const CreateComplaint = () => { const history = useHistory(); const registry = useContext(ComponentProvider); const dispatch = useDispatch(); - const { data: storeData, isLoading } = Digit.Hooks.useStore.getInitData(); - const { stateInfo } = storeData || {}; + // const { data: storeData, isLoading } = Digit.Hooks.useStore.getInitData(); + // const { stateInfo } = storeData || {}; const [params, setParams, clearParams] = Digit.Hooks.useSessionStorage(PGR_CITIZEN_CREATE_COMPLAINT, {}); // const [customConfig, setConfig] = Digit.Hooks.useSessionStorage(PGR_CITIZEN_COMPLAINT_CONFIG, {}); const config = useMemo(() => merge(defaultConfig, Digit.Customizations.PGR.complaintConfig), [Digit.Customizations.PGR.complaintConfig]); @@ -86,7 +86,7 @@ export const CreateComplaint = () => { region: city, localityCode, localityName, - state: stateInfo.name, + state: "pg", uploadedImages: _uploadImages, }; @@ -105,7 +105,7 @@ export const CreateComplaint = () => { goNext(); }; - if (isLoading) return null; + // if (isLoading) return null; return ( diff --git a/micro-ui/web/packages/ui-libraries/src/hooks/pgr/useServiceDefs.js b/micro-ui/web/packages/ui-libraries/src/hooks/pgr/useServiceDefs.js index ceea6438ce6..398698756b9 100644 --- a/micro-ui/web/packages/ui-libraries/src/hooks/pgr/useServiceDefs.js +++ b/micro-ui/web/packages/ui-libraries/src/hooks/pgr/useServiceDefs.js @@ -1,6 +1,5 @@ import { useTranslation } from "react-i18next"; - -const { useState, useEffect } = require("react"); +import React,{useState,useEffect} from 'react'; const useServiceDefs = (tenantId, moduleCode) => { const [localMenu, setLocalMenu] = useState([]);