Skip to content

Commit

Permalink
Adjust Logo Naming (#26)
Browse files Browse the repository at this point in the history
adjust name (#26)
  • Loading branch information
jabahum authored Oct 30, 2024
1 parent 85728ec commit c563951
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/config-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const configSchema = {
logo: {
src: {
_type: Type.String,
_default: "${openmrsSpaBase}/home/patient-queues",
_default: "/openmrs/spa/logo.svg",
_description:
"A path or URL to an image. If null, will use the OpenMRS SVG sprite.",
_validators: [validators.isUrl],
Expand All @@ -50,7 +50,7 @@ export const configSchema = {
_description: "Alt text, shown on hover",
},
},
loginBackgroundImage: {
loginBackground: {
src: {
_type: Type.String,
_default: "/openmrs/spa/background.png",
Expand All @@ -64,10 +64,10 @@ export const configSchema = {
_description: "Alt text, shown on hover",
},
},
loginLogoImage: {
loginBanner: {
src: {
_type: Type.String,
_default: "/openmrs/spa/logo.svg",
_default: "/openmrs/spa/banner.png",
_description:
"A path or URL to an image. If null, will use the OpenMRS SVG sprite.",
_validators: [validators.isUrl],
Expand Down
6 changes: 3 additions & 3 deletions src/login/background.wrapper.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { useConfig } from "@openmrs/esm-framework";
const BackgroundWrapper = ({ children }) => {
const config = useConfig();

return config?.loginBackgroundImage ? (
return config?.loginBackground ? (
<>
<img
src={config?.loginBackgroundImage?.src}
alt={config?.loginBackgroundImage?.alt || "Background Image"}
src={config?.loginBackground?.src}
alt={config?.loginBackground?.alt || "Background Image"}
className={styles.backgroundImage}
/>
<div className={styles.backgroundContainer}>
Expand Down
8 changes: 4 additions & 4 deletions src/login/logo.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React from "react";
import { useConfig } from "@openmrs/esm-framework";

const Logo = (props) => {
const { loginLogoImage } = useConfig();
return loginLogoImage.src ? (
const { loginBanner } = useConfig();
return loginBanner.src ? (
<img
{...props}
src={loginLogoImage.src}
alt={loginLogoImage.alt}
src={loginBanner.src}
alt={loginBanner.alt}
title="UgandaEMR+ logo"
/>
) : (
Expand Down

0 comments on commit c563951

Please sign in to comment.