Skip to content

Commit

Permalink
Update app file to include custom component
Browse files Browse the repository at this point in the history
  • Loading branch information
shailesh-egov committed Oct 4, 2024
1 parent b374489 commit 46563fb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,20 @@ export const initSampleComponents = () => {
Object.entries(componentsToRegister).forEach(([key, value]) => {
Digit.ComponentRegistryService.setComponent(key, value);
});
};

export const initIndividualComponents = () => {
// overrideHooks();
// updateCustomConfigs();
Object.entries(componentsToRegister).forEach(([key, value]) => {
Digit.ComponentRegistryService.setComponent(key, value);
});
};

export const initCoreComponents = () => {
// overrideHooks();
// updateCustomConfigs();
Object.entries(componentsToRegister).forEach(([key, value]) => {
Digit.ComponentRegistryService.setComponent(key, value);
});
};
10 changes: 6 additions & 4 deletions frontend/micro-ui/web/src/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import { initLibraries } from "@egovernments/digit-ui-libraries";

import { initCoreComponents } from "@egovernments/digit-ui-module-core";
import { initSampleComponents } from "@egovernments/digit-ui-module-core";
import { DigitUI } from "@egovernments/digit-ui-module-core";


Expand All @@ -17,7 +18,8 @@ const enabledModules = [
"HRMS",
"Engagement",
// "Workbench",
"PGR"
"PGR",
"Sample",
];

const moduleReducers = (initData) => ({
Expand All @@ -29,8 +31,8 @@ const initDigitUI = () => {

});

// initCoreComponents();

initCoreComponents();
initSampleComponents()

window.Digit.Customizations = {
PGR: {},
Expand Down
4 changes: 4 additions & 0 deletions frontend/micro-ui/web/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import ReactDOM from 'react-dom';
import { initLibraries } from "@egovernments/digit-ui-libraries";
import "./index.css";
import App from './App';
import { initCoreComponents } from "@egovernments/digit-ui-module-core";
import { initSampleComponents } from "@egovernments/digit-ui-module-core";
import { TLCustomisations } from './Customisations/tl/TLCustomisation';


initLibraries();
initCoreComponents();
initSampleComponents();


window.Digit.Customizations = { PGR: {} ,TL:TLCustomisations};
Expand Down

0 comments on commit 46563fb

Please sign in to comment.