Skip to content

Commit

Permalink
fix: use import for png logo
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebulis committed Nov 27, 2019
1 parent 481fc47 commit b90d3eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/templates/govtechDemoCert/certificate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import "./common/demoStyles.css";
import { TemplateProps } from "@govtechsg/decentralized-renderer-react-components";
import { GovtechOpencertsTemplateCertificate } from "../samples";
import { PrintWatermark } from "./common/PrintWatermark";
import logo from "./common/opencertslogo.svg";
import mainLogo from "./common/opencertslogo.svg";
import logo from "./common/GOVTECH_logo.png";

export const CertificateTemplate: FunctionComponent<TemplateProps<GovtechOpencertsTemplateCertificate>> = ({
document
Expand All @@ -30,7 +31,7 @@ export const CertificateTemplate: FunctionComponent<TemplateProps<GovtechOpencer
}}
>
<div className="my-5 m-lg-5 text-center">
<img src={logo} alt="OpenCerts Logo" style={{ width: "60%", height: "auto", maxWidth: "1000px" }} />
<img src={mainLogo} alt="OpenCerts Logo" style={{ width: "60%", height: "auto", maxWidth: "1000px" }} />
</div>
<div className="mb-4 mb-lg-5 d-flex justify-content-center cert-body" style={{ textAlign: "center" }}>
<i>This is to certify that</i>
Expand All @@ -53,7 +54,7 @@ export const CertificateTemplate: FunctionComponent<TemplateProps<GovtechOpencer
<img
className="w-100"
style={{ width: "100%", height: "auto", minWidth: "100px" }}
src={require("./common/GOVTECH_logo.png")}
src={logo}
alt="Govtech Logo"
/>
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/types/declaration.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ declare module "*.svg" {
const value: any;
export default value;
}
declare module "*.png" {
const value: any;
export default value;
}

0 comments on commit b90d3eb

Please sign in to comment.