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) { function ThumbnailList(props) {
const { thumbnails } = props const { thumbnails } = props
console.log('ThumbnailList')
return ( return (
<> <>
<div className="flex justify-center m-4 w-full"> <div className="flex justify-center m-4 w-full">

View File

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