mirror of
https://github.com/dergigi/boris.git
synced 2026-01-08 01:14:37 +01:00
refactor: remove duplicate formatDate function from helpers.ts
- Keep single formatDate implementation in bookmarkUtils.tsx - Both BookmarkList and BookmarkItem already import from bookmarkUtils - Maintain DRY principle by eliminating duplication
This commit is contained in:
@@ -1,10 +1,3 @@
|
||||
import { formatDistanceToNow } from 'date-fns'
|
||||
|
||||
export const formatDate = (timestamp: number): string => {
|
||||
const date = new Date(timestamp * 1000)
|
||||
return formatDistanceToNow(date, { addSuffix: true })
|
||||
}
|
||||
|
||||
// Extract pubkeys from nprofile strings in content
|
||||
export const extractNprofilePubkeys = (content: string): string[] => {
|
||||
const nprofileRegex = /nprofile1[a-z0-9]+/gi
|
||||
|
||||
Reference in New Issue
Block a user