diff --git a/index.html b/index.html index 0191123..be08a13 100644 --- a/index.html +++ b/index.html @@ -461,12 +461,34 @@ Nearby - - + Profile Icon + + + + + + + + + + + +
+
+ + Home + +

Edit Profile

+
+ +
+

Select Avatar

+
+ + + + + +
+ +
+ +
+

Edit Details

+ + + + + + + + + +
+ +
+ + + + + + + + + diff --git a/testp.js b/testp.js index d9ddcda..87f42cb 100644 --- a/testp.js +++ b/testp.js @@ -1,37 +1,40 @@ // Get current timestamp const getCurrentTimestamp = () => { - return new Date().getTime(); - }; + return new Date().getTime(); +}; - // Store last active timestamp in LocalStorage - const storeLastActive = () => { - const lastActive = getCurrentTimestamp(); - localStorage.setItem('lastActive', lastActive); - }; +// Store last active timestamp in LocalStorage +const storeLastActive = () => { + const lastActive = getCurrentTimestamp(); + localStorage.setItem('lastActive', lastActive); +}; - // Get last active timestamp from LocalStorage - const getLastActive = () => { - return localStorage.getItem('lastActive'); - }; +// Get last active timestamp from LocalStorage +const getLastActive = () => { + return localStorage.getItem('lastActive'); +}; - // Update last active timestamp on page load and interaction - document.addEventListener('DOMContentLoaded', storeLastActive); - document.addEventListener('click', storeLastActive); - document.addEventListener('scroll', storeLastActive); - document.addEventListener('keydown', storeLastActive); +// Update last active timestamp on page load and interaction +document.addEventListener('DOMContentLoaded', storeLastActive); +document.addEventListener('click', storeLastActive); +document.addEventListener('scroll', storeLastActive); +document.addEventListener('keydown', storeLastActive); - // Example usage: - const displayLastActive = () => { - const lastActive = getLastActive(); - const formattedTime = new Date(parseInt(lastActive)).toLocaleString(); - document.getElementById('last-active').innerHTML = Last active: ${formattedTime}; - }; +// Example usage: +const displayLastActive = () => { + const lastActive = getLastActive(); + if (lastActive) { + const formattedTime = new Date(parseInt(lastActive)).toLocaleString(); + document.getElementById('last-active').innerHTML = `Last active: ${formattedTime}`; + } +}; - - displayLastActive(); + +// Display the last active time on page load +document.addEventListener('DOMContentLoaded', displayLastActive);