Skip to content

Commit

Permalink
fix: 정적 html2canvas import로 인한 네이티브 동작 문제로 인해 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
junghyunbak committed Nov 18, 2023
1 parent 79e0b73 commit 7acf298
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions apis/methods/get.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// axios
import axios from "axios";
import { baseUrl } from "..";

// html2canvas
import html2canvas from "html2canvas";

export const getEmailDuplicationStatus = async (
email: string
Expand Down Expand Up @@ -100,17 +96,3 @@ export const getImageUrl = async (imageId: number): Promise<DiaryImage> => {

return data;
};

/**
* 항상 내부적으로 api를 요청하지는 않지만, html에 이미지가 존재하는 경우 api 요청이 이루어지므로
* api 주소를 한 곳에서 집중적으로 관리할 필요가 있어 해당 파일 다른 api 함수와 같은 형태로 작성함.
*/
export const getCanvasWithHtmlWithImage = async (
element: HTMLElement
): Promise<HTMLCanvasElement> => {
const canvas = await html2canvas(element, {
proxy: `${baseUrl}/api/v1/proxy`,
});

return canvas;
};

0 comments on commit 7acf298

Please sign in to comment.