File tree 2 files changed +17
-4
lines changed
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'
2
2
import { Avatar } from '@/ui'
3
3
import { DateTime } from 'luxon'
4
4
import { A } from '@/components'
5
+ import classNames from 'classnames'
5
6
6
7
export default function GoalMeta ( {
7
8
className = '' ,
@@ -104,7 +105,12 @@ export default function GoalMeta({
104
105
</ ul >
105
106
< div className = "flex items-center space-x-2 mt-5" >
106
107
< 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
+ ) }
108
114
data-todo-x-description = "Heroicon name: solid/calendar"
109
115
xmlns = "http://www.w3.org/2000/svg"
110
116
viewBox = "0 0 20 20"
@@ -117,7 +123,14 @@ export default function GoalMeta({
117
123
clipRule = "evenodd"
118
124
> </ path >
119
125
</ 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
+ >
121
134
Deadline on{ ' ' }
122
135
< time dateTime = { createdAt . toISO ( ) } >
123
136
{ deadline . toLocaleString ( DateTime . DATE_FULL ) }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import useFollowUser from './useFollowUser'
14
14
import { useSession } from 'next-auth/client'
15
15
16
16
export default function Profile ( { user } : { user : User } ) {
17
- const [ session ] = useSession ( )
17
+ const [ session , loading ] = useSession ( )
18
18
const {
19
19
shouldShowFollowButton,
20
20
isFollowing : isFollowingData ,
@@ -45,7 +45,7 @@ export default function Profile({ user }: { user: User }) {
45
45
< div className = "sm:flex sm:items-center sm:justify-between" >
46
46
< div className = "sm:flex sm:space-x-5 sm:items-center" >
47
47
< div className = "flex-shrink-0" >
48
- < A href = { `/ ${ ( session . user as User ) . username } ` } >
48
+ < A href = { user . username } >
49
49
< img
50
50
className = "mx-auto h-20 w-20 rounded-full"
51
51
src = { user . image }
You can’t perform that action at this time.
0 commit comments