start date added to the lottery page
This commit is contained in:
parent
d4ccaf0563
commit
74d1a5b5c3
|
|
@ -0,0 +1,23 @@
|
|||
interface IProps {
|
||||
text: string;
|
||||
date: string;
|
||||
}
|
||||
|
||||
const InfoDateAllert = ({ text, date }: IProps) => {
|
||||
function formatDate(dateTimeString: string) {
|
||||
const [datePart] = dateTimeString.split(' ');
|
||||
const [year, month, day] = datePart.split('-');
|
||||
return `${day}-${month}-${year}`;
|
||||
}
|
||||
|
||||
const readyDate = formatDate(date);
|
||||
|
||||
return (
|
||||
<div className="flex gap-[8px] py-3 px-4 text-lightOnInfoAllertContainer bg-lightInfoAllertContainerOutline text-base-medium">
|
||||
<span>{text}</span>
|
||||
<span>{readyDate}</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default InfoDateAllert;
|
||||
Loading…
Reference in New Issue