-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3079 from amitsingh-007/f-shortcut-panel-improvment
- Loading branch information
Showing
4 changed files
with
58 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { getLastVisited } from '@/helpers/fetchFromStorage'; | ||
import md5 from 'md5'; | ||
|
||
export const getlastVisitedText = async (url: string) => { | ||
const lastVisitedData = await getLastVisited(); | ||
const { hostname } = new URL(url); | ||
const lastVisitedDate = lastVisitedData[md5(hostname)]; | ||
if (!lastVisitedDate) { | ||
return ''; | ||
} | ||
const date = new Date(lastVisitedDate); | ||
return `${date.toDateString()}, ${date.toLocaleTimeString()}`; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ba5854f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for bypass-links ready!
✅ Preview
https://bypass-links-cch68iuig-amit-singhs-projects-c621efdb.vercel.app
Built with commit ba5854f.
This pull request is being automatically deployed with vercel-action