mirror of
https://github.com/logos-storage/logos-storage-marketplace-ui.git
synced 2026-01-02 13:33:06 +00:00
Fix the uploadedAt value
This commit is contained in:
parent
6380f53e1e
commit
cc066ffa40
@ -40,7 +40,7 @@ export function StorageRequestFileChooser({
|
||||
};
|
||||
|
||||
const onSuccess = (data: string) => {
|
||||
FilesUtils.setUploadedAt(data, Date.now());
|
||||
FilesUtils.setUploadedAt(data, Date.now() / 1000);
|
||||
|
||||
queryClient.invalidateQueries({ queryKey: ["cids"] });
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ export function UploadCard() {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const onSuccess = (cid: string) => {
|
||||
FilesUtils.setUploadedAt(cid, Date.now());
|
||||
FilesUtils.setUploadedAt(cid, Date.now() / 1000);
|
||||
queryClient.invalidateQueries({ queryKey: ["cids"] });
|
||||
};
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ export type TimesUnit =
|
||||
| "seconds";
|
||||
|
||||
const plural = (value: number, unit: TimesUnit) => {
|
||||
const val = value.toFixed(1);
|
||||
const val = Number.isInteger(value) ? value : value.toFixed(1);
|
||||
return value > 1 ? val + ` ${unit}` : val + ` ${unit.slice(0, -1)}`;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user