파일이름 재정의
This commit is contained in:
@@ -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(){
|
||||
|
||||
@@ -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'), () => {
|
||||
|
||||
Reference in New Issue
Block a user