Skip to content

Commit

Permalink
Extra Input program improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
daliusd committed Jun 21, 2024
1 parent dcfcae3 commit 648cfd8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/InvoiceEdit/ExtraInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
seriesNameState,
} from '../../src/atoms';
import { useDebounce } from 'react-use';
import { getMsSinceEpoch } from '../../utils/date';

function useDebouncedRecoilState<T>(recoilState: RecoilState<T>) {
const [value] = useRecoilState(recoilState);
Expand Down Expand Up @@ -78,7 +79,7 @@ export default function ExtraInput() {
const invoiceType = ${JSON.stringify(invoiceType || 'standard')};
const seriesName = ${JSON.stringify(seriesName)};
const seriesId = ${seriesId};
const date = new Date(${(invoiceDate || new Date()).getTime()});
const date = new Date(${getMsSinceEpoch(invoiceDate || new Date())});
const language = ${JSON.stringify(language || 'lt')};
const seller = ${JSON.stringify(seller)};
const buyer = ${JSON.stringify(buyer)};
Expand Down

0 comments on commit 648cfd8

Please sign in to comment.