mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed stats
This commit is contained in:
parent
d3ce02e52b
commit
254f9c7af0
5 changed files with 17 additions and 19 deletions
|
@ -2,12 +2,13 @@
|
|||
|
||||
.group {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
grid-template-columns: 1fr 1fr 0.5fr;
|
||||
grid-column-gap: $gap;
|
||||
grid-row-gap: $gap;
|
||||
grid-auto-rows: 140px;
|
||||
|
||||
@include tablet {
|
||||
grid-template-columns: 1fr;
|
||||
grid-auto-rows: 120px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ interface StatsCountdownCardProps extends CardProps {
|
|||
const StatsCountdownCard: VFC<StatsCountdownCardProps> = ({ since, ...props }) => {
|
||||
const years = differenceInYears(new Date(), since);
|
||||
const months = differenceInMonths(new Date(), addYears(since, years));
|
||||
const days = differenceInDays(new Date(), addMonths(addYears(since, years), months));
|
||||
|
||||
return (
|
||||
<StatsCard {...props} title="Нам уже" className={classNames(styles.card, props.className)}>
|
||||
|
@ -36,14 +35,7 @@ const StatsCountdownCard: VFC<StatsCountdownCardProps> = ({ since, ...props }) =
|
|||
{months > 0 && (
|
||||
<>
|
||||
<span className={styles.val}>{months}</span>
|
||||
{' мес. '}
|
||||
</>
|
||||
)}
|
||||
|
||||
{days > 0 && (
|
||||
<>
|
||||
<span className={styles.val}>{days}</span>
|
||||
{' дн. '}
|
||||
{' мес '}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
span.val {
|
||||
font: $font_48_bold;
|
||||
color: white;
|
||||
padding: 0 $gap * 0.5 0 $gap * 2;
|
||||
padding: $gap;
|
||||
}
|
||||
|
||||
.card {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue