File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { User } from 'src/pages/members'
22import { Avatar } from '@/ui'
33import { DateTime } from 'luxon'
44import { A } from '@/components'
5+ import classNames from 'classnames'
56
67export default function GoalMeta ( {
78 className = '' ,
@@ -104,7 +105,12 @@ export default function GoalMeta({
104105 </ ul >
105106 < div className = "flex items-center space-x-2 mt-5" >
106107 < svg
107- className = "h-5 w-5 text-gray-400"
108+ className = { classNames (
109+ 'h-5 w-5' ,
110+ deadline . diffNow ( 'days' ) . days > 0
111+ ? 'text-gray-400'
112+ : 'text-danger-500'
113+ ) }
108114 data-todo-x-description = "Heroicon name: solid/calendar"
109115 xmlns = "http://www.w3.org/2000/svg"
110116 viewBox = "0 0 20 20"
@@ -117,7 +123,14 @@ export default function GoalMeta({
117123 clipRule = "evenodd"
118124 > </ path >
119125 </ svg >
120- < span className = "text-gray-900 text-sm font-medium" >
126+ < span
127+ className = { classNames (
128+ 'text-sm font-medium' ,
129+ deadline . diffNow ( 'days' ) . days > 0
130+ ? 'text-gray-900'
131+ : 'text-danger-500'
132+ ) }
133+ >
121134 Deadline on{ ' ' }
122135 < time dateTime = { createdAt . toISO ( ) } >
123136 { deadline . toLocaleString ( DateTime . DATE_FULL ) }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import useFollowUser from './useFollowUser'
1414import { useSession } from 'next-auth/client'
1515
1616export default function Profile ( { user } : { user : User } ) {
17- const [ session ] = useSession ( )
17+ const [ session , loading ] = useSession ( )
1818 const {
1919 shouldShowFollowButton,
2020 isFollowing : isFollowingData ,
@@ -45,7 +45,7 @@ export default function Profile({ user }: { user: User }) {
4545 < div className = "sm:flex sm:items-center sm:justify-between" >
4646 < div className = "sm:flex sm:space-x-5 sm:items-center" >
4747 < div className = "flex-shrink-0" >
48- < A href = { `/ ${ ( session . user as User ) . username } ` } >
48+ < A href = { user . username } >
4949 < img
5050 className = "mx-auto h-20 w-20 rounded-full"
5151 src = { user . image }
You can’t perform that action at this time.
0 commit comments