@djb25/digit-ui-module-ekyc 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,83 +8,62 @@ import AddressDetails from "../employee/AddressDetails";
8
8
  import PropertyInfo from "../employee/PropertyInfo";
9
9
  import MeterDetails from "../employee/MeterDetails";
10
10
  import Review from "../employee/Review";
11
+ import Home from "./Home";
12
+ import Dashboard from "../../components/Dashboard";
13
+ import Inbox from "./Inbox";
11
14
 
12
15
  const CitizenApp = () => {
13
- const { t } = useTranslation();
14
- const location = useLocation();
15
- const { path } = useRouteMatch();
16
+ const { t } = useTranslation();
17
+ const location = useLocation();
18
+ const { path } = useRouteMatch();
16
19
 
17
- sessionStorage.removeItem("revalidateddone");
20
+ sessionStorage.removeItem("revalidateddone");
18
21
 
19
- const getBreadcrumbLabel = () => {
20
- const pathname = location.pathname;
21
- if (pathname.includes("/create-kyc")) return "EKYC_CREATE_KYC";
22
- if (pathname.includes("/aadhaar-verification")) return "EKYC_AADHAAR_VERIFICATION";
23
- if (pathname.includes("/address-details")) return "EKYC_ADDRESS_DETAILS";
24
- if (pathname.includes("/property-info")) return "EKYC_PROPERTY_INFO";
25
- if (pathname.includes("/meter-details")) return "EKYC_METER_DETAILS";
26
- if (pathname.includes("/review")) return "EKYC_REVIEW";
27
- return "EKYC_HOME";
28
- };
22
+ const getBreadcrumbLabel = () => {
23
+ const pathname = location.pathname;
24
+ if (pathname.includes("/create-kyc")) return "EKYC_CREATE_KYC";
25
+ if (pathname.includes("/aadhaar-verification")) return "EKYC_AADHAAR_VERIFICATION";
26
+ if (pathname.includes("/address-details")) return "EKYC_ADDRESS_DETAILS";
27
+ if (pathname.includes("/property-info")) return "EKYC_PROPERTY_INFO";
28
+ if (pathname.includes("/meter-details")) return "EKYC_METER_DETAILS";
29
+ if (pathname.includes("/review")) return "EKYC_REVIEW";
30
+ return "EKYC_HOME";
31
+ };
29
32
 
30
- const breadcrumbs = [
31
- { icon: HomeIcon, path: "/digit-ui/citizen" },
32
- { label: t(getBreadcrumbLabel()) }
33
- ];
33
+ const breadcrumbs = [{ icon: HomeIcon, path: "/digit-ui/citizen" }, { label: t(getBreadcrumbLabel()) }];
34
34
 
35
- return (
36
- <AppContainer>
37
- <div className="ground-container employee-app-container form-container">
38
- <ModuleHeader
39
- leftContent={
40
- <React.Fragment>
41
- <ArrowLeft className="icon" />
42
- {t("CS_COMMON_BACK")}
43
- </React.Fragment>
44
- }
45
- onLeftClick={() => window.history.back()}
46
- breadcrumbs={breadcrumbs}
47
- />
35
+ return (
36
+ <AppContainer>
37
+ <div className="ground-container employee-app-container form-container">
38
+ <ModuleHeader
39
+ leftContent={
40
+ <React.Fragment>
41
+ <ArrowLeft className="icon" />
42
+ {t("CS_COMMON_BACK")}
43
+ </React.Fragment>
44
+ }
45
+ onLeftClick={() => window.history.back()}
46
+ breadcrumbs={breadcrumbs}
47
+ />
48
48
 
49
- <Switch>
50
- <PrivateRoute
51
- path={`${path}/create-kyc`}
52
- component={() => <Create />}
53
- />
49
+ <Switch>
50
+ <PrivateRoute exact path={`${path}`} component={() => <Home />} />
51
+ <PrivateRoute path={`${path}/dashboard`} component={() => <Dashboard />} />
52
+ <PrivateRoute path={`${path}/inbox`} component={() => <Inbox />} />
54
53
 
55
- <PrivateRoute
56
- path={`${path}/aadhaar-verification`}
57
- component={() => <AadhaarVerification />}
58
- />
54
+ <PrivateRoute path={`${path}/aadhaar-verification`} component={() => <AadhaarVerification />} />
59
55
 
60
- <PrivateRoute
61
- path={`${path}/address-details`}
62
- component={() => <AddressDetails />}
63
- />
56
+ <PrivateRoute path={`${path}/address-details`} component={() => <AddressDetails />} />
64
57
 
65
- <PrivateRoute
66
- path={`${path}/property-info`}
67
- component={() => <PropertyInfo />}
68
- />
58
+ <PrivateRoute path={`${path}/property-info`} component={() => <PropertyInfo />} />
69
59
 
70
- <PrivateRoute
71
- path={`${path}/meter-details`}
72
- component={() => <MeterDetails />}
73
- />
74
-
75
- <PrivateRoute
76
- path={`${path}/review`}
77
- component={() => <Review />}
78
- />
60
+ <PrivateRoute path={`${path}/meter-details`} component={() => <MeterDetails />} />
79
61
 
80
- <PrivateRoute
81
- path={`${path}/`}
82
- component={() => <Create />}
83
- />
84
- </Switch>
85
- </div>
86
- </AppContainer>
87
- );
62
+ <PrivateRoute path={`${path}/review`} component={() => <Review />} />
63
+ </Switch>
64
+ </div>
65
+ </AppContainer>
66
+ );
88
67
  };
89
68
 
90
69
  export default CitizenApp;