chore: Remove console.log statements from ThumbnailList component

This commit is contained in:
yoosangwook 2024-08-21 13:54:10 +09:00
parent db333e06e0
commit 55068138ba
2 changed files with 11 additions and 14 deletions

View File

@ -4,6 +4,8 @@ import { memo } from 'react'
function ThumbnailList(props) {
const { thumbnails } = props
console.log('ThumbnailList')
return (
<>
<div className="flex justify-center m-4 w-full">

View File

@ -1,13 +1,6 @@
import { useEffect, useRef, useState } from 'react'
import { fabric } from 'fabric'
import {
actionHandler,
anchorWrapper,
calculateIntersection,
distanceBetweenPoints,
polygonPositionHandler,
test,
} from '@/util/canvas-util'
import { actionHandler, anchorWrapper, calculateIntersection, distanceBetweenPoints, polygonPositionHandler, test } from '@/util/canvas-util'
import { useRecoilState } from 'recoil'
import { canvasSizeState, fontSizeState } from '@/store/canvasAtom'
@ -509,11 +502,13 @@ export function useCanvas(id) {
* @param {string} title - 저장할 이미지 이름
*/
const saveImage = async (title = 'canvas') => {
await writeImage(title, canvas?.toDataURL('image/png').replace('data:image/png;base64,', '')).then(res => {
console.log('success', res)
}).catch(err => {
console.log('err', err)
})
await writeImage(title, canvas?.toDataURL('image/png').replace('data:image/png;base64,', ''))
.then((res) => {
console.log('success', res)
})
.catch((err) => {
console.log('err', err)
})
}
const handleFlip = () => {
@ -570,7 +565,7 @@ export function useCanvas(id) {
const dataUrl = tempCanvas.toDataURL({ format: 'png' })
// Set the image as the background of the original canvas
fabric.Image.fromURL(dataUrl, function(img) {
fabric.Image.fromURL(dataUrl, function (img) {
canvas.setBackgroundImage(img, canvas.renderAll.bind(canvas), {
scaleX: canvas.width / img.width,
scaleY: canvas.height / img.height,