mirror of
https://github.com/jcreek/EstimationPoker.git
synced 2026-07-12 18:43:47 +00:00
fix(*): Prevent showing new users all previous change logs
This commit is contained in:
@@ -20,8 +20,8 @@
|
|||||||
// Get the user's last visit timestamp from localStorage
|
// Get the user's last visit timestamp from localStorage
|
||||||
let lastVisitTimestamp = localStorage.getItem('lastVisitTimestamp');
|
let lastVisitTimestamp = localStorage.getItem('lastVisitTimestamp');
|
||||||
|
|
||||||
// If lastVisitTimestamp is null or undefined, set it to 0
|
// If lastVisitTimestamp is null or undefined, set it to today's date
|
||||||
lastVisitTimestamp = lastVisitTimestamp ? lastVisitTimestamp : '0';
|
lastVisitTimestamp = lastVisitTimestamp ? lastVisitTimestamp : new Date().toISOString();
|
||||||
|
|
||||||
// Filter changes made after the user's last visit
|
// Filter changes made after the user's last visit
|
||||||
newChanges = changesLog.filter((change) => change.timestamp > lastVisitTimestamp);
|
newChanges = changesLog.filter((change) => change.timestamp > lastVisitTimestamp);
|
||||||
|
|||||||
Reference in New Issue
Block a user