Skip to content

Commit

Permalink
fix: a couple of lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yapyuyou committed Mar 14, 2024
1 parent c17612e commit fb6d942
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/renderer/SvgRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { sha256 } from "multiformats/hashes/sha2";
import React, { CSSProperties, FunctionComponent, useEffect, useState } from "react";
import { renderToStaticMarkup } from "react-dom/server";
import { ConnectionFailureTemplate } from "../../DefaultTemplate";
/* eslint-disable @typescript-eslint/no-var-requires */
const handlebars = require("handlebars");

interface SvgRendererProps {
Expand Down Expand Up @@ -93,7 +94,7 @@ export const SvgRenderer: FunctionComponent<SvgRendererProps> = ({
}
}, [buffer]);

Check failure on line 95 in src/components/renderer/SvgRenderer.tsx

View workflow job for this annotation

GitHub Actions / Test

React Hook useEffect has missing dependencies: 'docAsAny.renderMethod.digestMultibase', 'onConnected', and 'updateIframeHeight'. Either include them or remove the dependency array. If 'onConnected' changes too often, find the parent component that defines it and wrap that definition in useCallback

const renderTemplate = (template: String, document: any) => {
const renderTemplate = (template: string, document: any) => {
if (template.length === 0) return "";
const v4doc = document as v4.OpenAttestationDocument;
const compiledTemplate = handlebars.compile(template);
Expand Down

0 comments on commit fb6d942

Please sign in to comment.