forked from WeMakeDevs/wemakedevs-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Hackathon Page (WeMakeDevs#506)
* fix: Hackathon Page * fix: timeline --------- Co-authored-by: Chandraprakash-Darji <[email protected]>
- Loading branch information
1 parent
84217ca
commit fc6b535
Showing
3 changed files
with
108 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { AiOutlineCalendar } from 'react-icons/ai'; | ||
|
||
const TimeLineCard = ({ title, date }) => { | ||
return ( | ||
<li className='relative flex w-full gap-5 md:max-w-[20rem] md:flex-col'> | ||
<div className='flex items-center'> | ||
<AiOutlineCalendar className='h3 h-14 w-14 shrink-0 rounded-full bg-primary p-3' /> | ||
<div className='h-0.5 w-full bg-white/50 md:flex'></div> | ||
</div> | ||
<div className='mt-3 sm:pr-8'> | ||
<h3 className='font-semibold'>{title}</h3> | ||
<time className='h4 mb-2 block leading-none text-white/70'> | ||
{new Date(date).toLocaleDateString('en-US', { | ||
dateStyle: 'medium', | ||
})}{' '} | ||
{new Date(date).toLocaleTimeString('en-US', { | ||
timeStyle: 'short', | ||
})}{' '} | ||
{/\((.*)\)/ | ||
.exec(new Date(date).toString())[1] | ||
.split(' ') | ||
.map((i) => i[0].toUpperCase()) | ||
.join('')} | ||
</time> | ||
</div> | ||
</li> | ||
); | ||
}; | ||
|
||
export default TimeLineCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters