파일이름 재정의

This commit is contained in:
focp212@naver.com
2025-11-12 14:16:50 +09:00
parent ba116aeaf4
commit 21bc8840a1
2 changed files with 5 additions and 2 deletions

View File

@@ -47,7 +47,8 @@ export const CashReceiptSample = ({
const section = document.getElementById('image-section') as HTMLElement;
toPng(section).then((image) => {
const link = document.createElement('a');
link.download = 'downloadImage.png';
let fileName = 'cash-receipt-' + moment().format('YYMMDDHHmmss');
link.download = fileName + '.png';
link.href = image;
link.click();
snackBar(t('common.imageRequested'), function(){

View File

@@ -7,6 +7,7 @@ import { ClipLoader, FadeLoader } from 'react-spinners';
import { CSSProperties, useEffect, useState } from 'react';
import { NumericFormat } from 'react-number-format';
import { DepositInfo } from '@/entities/transaction/model/types';
import moment from 'moment';
export interface DepositReceiptSampleProps {
depositReceiptSampleOn: boolean;
@@ -37,7 +38,8 @@ export const DepositReceiptSample = ({
const section = document.getElementById('image-section') as HTMLElement
toPng(section).then((image) => {
const link = document.createElement('a');
link.download = 'downloadImage.png';
let fileName = 'receipt-confirmation-' + moment().format('YYMMDDHHmmss');
link.download = fileName + '.png';
link.href = image;
link.click();
snackBar(t('common.imageRequested'), () => {