Skip to content

Commit

Permalink
Make compatible with tick dateClimbed as Date (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
zichongkao committed Jun 8, 2023
1 parent 87245e8 commit d510cf4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/users/TickCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface Props{
ticks: TickType[]
setTicks: Function
tickId: string
dateClimbed: string
dateClimbed: Date
notes: string
style: string
}
Expand All @@ -33,7 +33,7 @@ export default function TickCard ({ tickId, ticks, setTicks, dateClimbed, notes,
return (
<div className='flex flex-row justify-between px-3 py-3 mb-3 border-2 rounded-lg border-slate-100' id={tickId}>
<div className='flex flex-col'>
<p className='text-md text-left text-gray-500'>{dateClimbed}</p>
<p className='text-md text-left text-gray-500'>{dateClimbed.toLocaleDateString()}</p>
<p className='text-sm text-gray-500 mb-0'>{notes}</p>
</div>
<div className='flex flex-row'>
Expand Down
2 changes: 1 addition & 1 deletion src/js/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export interface TickType {
climbId: string
style: string
attemptType: string
dateClimbed: string
dateClimbed: Date
grade: string
source: string
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/u2/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Tick = (tick: TickType): JSX.Element => {
<a className='hover:underline'>{name}</a>
</Link>
</div>
<div className='text-base-300'>{dateClimbed}</div>
<div className='text-base-300'>{dateClimbed.toLocaleDateString()}</div>
</div>
)
}
Expand Down

1 comment on commit d510cf4

@vercel
Copy link

@vercel vercel bot commented on d510cf4 Jun 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.