Change id generation algorithm, display notifications total on the main page

This commit is contained in:
Maksim Eltyshev
2019-10-10 02:51:54 +05:00
parent 9ebc82bf22
commit 3848cc194a
86 changed files with 264 additions and 159 deletions

View File

@@ -1,3 +1,3 @@
export const nextLocalId = (maxId = 0) => maxId + Date.now() / 10000000000000;
export const createLocalId = () => `local:${Date.now()}`;
export const isLocalId = (id) => id % 1 !== 0;
export const isLocalId = (id) => id.startsWith('local:');