the statusphere demo reworked into a vite/react app in a monorepo

Smarter timestamps

+6 -1
+6 -1
src/pages/home.ts
··· 3 3 import { html } from '../view' 4 4 import { shell } from './shell' 5 5 6 + const TODAY = new Date().toDateString() 7 + 6 8 const STATUS_OPTIONS = [ 7 9 '👍', 8 10 '👎', ··· 89 91 </div> 90 92 ${statuses.map((status, i) => { 91 93 const handle = didHandleMap[status.authorDid] || status.authorDid 94 + const date = ts(status) 92 95 return html` 93 96 <div class=${i === 0 ? 'status-line no-line' : 'status-line'}> 94 97 <div> ··· 96 99 </div> 97 100 <div class="desc"> 98 101 <a class="author" href=${toBskyLink(handle)}>@${handle}</a> 99 - is feeling ${status.status} on ${ts(status)} 102 + ${date === TODAY 103 + ? `is feeling ${status.status} today` 104 + : `was feeling ${status.status} on ${date}`} 100 105 </div> 101 106 </div> 102 107 `