Skip to content

Commit

Permalink
left logo top bar (#1492)
Browse files Browse the repository at this point in the history
* left logo top bar

* added dss logo

---------

Co-authored-by: nabeelmd-eGov <[email protected]>
Co-authored-by: NabeelAyubee <[email protected]>
  • Loading branch information
3 people authored Oct 10, 2024
1 parent 09463f0 commit b657e8e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ViewUrl from "./pages/employee/ViewUrl";
import CustomErrorComponent from "./components/CustomErrorComponent";
import DummyLoaderScreen from "./components/DummyLoader";

export const DigitApp = ({ stateCode, modules, appTenants, logoUrl, initData, defaultLanding = "citizen" }) => {
export const DigitApp = ({ stateCode, modules, appTenants, logoUrl, logoUrlWhite, initData, defaultLanding = "citizen" }) => {
const history = useHistory();
const { pathname } = useLocation();
const innerWidth = window.innerWidth;
Expand Down Expand Up @@ -61,6 +61,7 @@ export const DigitApp = ({ stateCode, modules, appTenants, logoUrl, initData, de
mobileView,
handleUserDropdownSelection,
logoUrl,
logoUrlWhite,
DSO,
stateCode,
modules,
Expand All @@ -85,7 +86,7 @@ export const DigitApp = ({ stateCode, modules, appTenants, logoUrl, initData, de
);
};

export const DigitAppWrapper = ({ stateCode, modules, appTenants, logoUrl, initData, defaultLanding = "citizen" }) => {
export const DigitAppWrapper = ({ stateCode, modules, appTenants, logoUrl, logoUrlWhite, initData, defaultLanding = "citizen" }) => {
// const globalPath = window?.globalConfigs?.getConfig("CONTEXT_PATH") || "digit-ui";
const { data: storeData } = Digit.Hooks.useStore.getInitData();
const { stateInfo } = storeData || {};
Expand Down Expand Up @@ -126,6 +127,7 @@ export const DigitAppWrapper = ({ stateCode, modules, appTenants, logoUrl, initD
modules={modules}
appTenants={appTenants}
logoUrl={logoUrl}
logoUrlWhite={logoUrlWhite}
initData={initData}
defaultLanding={defaultLanding}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const DigitUIWrapper = ({ stateCode, enabledModules, moduleReducers, defaultLand
return <Loader page={true} />;
}
const data=getStore(initData, moduleReducers(initData)) || {};

const i18n = getI18n();
if(!Digit.ComponentRegistryService.getComponent("PrivacyComponent")){
Digit.ComponentRegistryService.setComponent("PrivacyComponent", PrivacyComponent);
Expand All @@ -37,6 +36,7 @@ const DigitUIWrapper = ({ stateCode, enabledModules, moduleReducers, defaultLand
modules={initData?.modules}
appTenants={initData.tenants}
logoUrl={initData?.stateInfo?.logoUrl}
logoUrlWhite={initData?.stateInfo?.logoUrlWhite}
defaultLanding={defaultLanding}
/>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ export const RoleBasedEmployeeHome = ({ modules, additionalComponent }) => {
? "Search"
: linkUrl.includes("edit")
? "Edit"
: linkUrl.includes("dss")
? "Dashboard"
: "PhonelinkSetup",
// link: queryParamIndex === -1 ? linkUrl : linkUrl.substring(0, queryParamIndex),
queryParams: queryParamIndex === -1 ? null : linkUrl.substring(queryParamIndex),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const TopBar = ({
userOptions,
handleUserDropdownSelection,
logoUrl,
logoUrlWhite,
showLanguageChange = true,
}) => {
const [profilePic, setProfilePic] = React.useState(null);
Expand Down Expand Up @@ -155,7 +156,7 @@ const TopBar = ({
{t(`ULBGRADE_${cityDetails?.city?.ulbGrade.toUpperCase().replace(" ", "_").replace(".", "_")}`).toUpperCase()}
</>
) : (
<img className="state" src={logoUrl} alt="State Logo" />
<img className="state" src={logoUrlWhite} alt="State Logo" />
)
) : (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const TopBarSideBar = ({
mobileView,
handleUserDropdownSelection,
logoUrl,
logoUrlWhite,
showSidebar = true,
showLanguageChange,
linkData,
Expand Down Expand Up @@ -58,6 +59,7 @@ const TopBarSideBar = ({
userOptions={userOptions}
handleUserDropdownSelection={handleUserDropdownSelection}
logoUrl={logoUrl}
logoUrlWhite={logoUrlWhite}
showLanguageChange={showLanguageChange}
/>
{showDialog && <LogoutDialog onSelect={handleOnSubmit} onCancel={handleOnCancel} onDismiss={handleOnCancel}></LogoutDialog>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const EmployeeApp = ({
mobileView,
handleUserDropdownSelection,
logoUrl,
logoUrlWhite,
DSO,
stateCode,
modules,
Expand Down Expand Up @@ -60,6 +61,7 @@ const EmployeeApp = ({
mobileView={mobileView}
handleUserDropdownSelection={handleUserDropdownSelection}
logoUrl={logoUrl}
logoUrlWhite={logoUrlWhite}
showSidebar={isUserProfile ? true : false}
showLanguageChange={!showLanguageChange}
/>
Expand Down Expand Up @@ -120,6 +122,7 @@ const EmployeeApp = ({
mobileView={mobileView}
handleUserDropdownSelection={handleUserDropdownSelection}
logoUrl={logoUrl}
logoUrlWhite={logoUrlWhite}
modules={modules}
/>
<div className={`main ${DSO ? "m-auto" : ""} digit-home-main`}>
Expand Down

0 comments on commit b657e8e

Please sign in to comment.