types-fixed-2
This commit is contained in:
parent
bd1b0025e7
commit
a383283cd2
|
@ -13,7 +13,6 @@ import { useArticlesStore, resetSortedArticles } from '../../../stores/zine/arti
|
||||||
import { useTopAuthorsStore } from '../../../stores/zine/topAuthors'
|
import { useTopAuthorsStore } from '../../../stores/zine/topAuthors'
|
||||||
import { useTopicsStore } from '../../../stores/zine/topics'
|
import { useTopicsStore } from '../../../stores/zine/topics'
|
||||||
import { getImageUrl } from '../../../utils/getImageUrl'
|
import { getImageUrl } from '../../../utils/getImageUrl'
|
||||||
import { getUnixtime } from '../../../utils/getServerDate'
|
|
||||||
import { DropDown } from '../../_shared/DropDown'
|
import { DropDown } from '../../_shared/DropDown'
|
||||||
import { Icon } from '../../_shared/Icon'
|
import { Icon } from '../../_shared/Icon'
|
||||||
import { Loading } from '../../_shared/Loading'
|
import { Loading } from '../../_shared/Loading'
|
||||||
|
@ -60,12 +59,15 @@ const getFromDate = (period: FeedPeriod): number => {
|
||||||
switch (period) {
|
switch (period) {
|
||||||
case 'week': {
|
case 'week': {
|
||||||
d = new Date(now.setDate(now.getDate() - 7))
|
d = new Date(now.setDate(now.getDate() - 7))
|
||||||
|
break
|
||||||
}
|
}
|
||||||
case 'month': {
|
case 'month': {
|
||||||
d = new Date(now.setMonth(now.getMonth() - 1))
|
d = new Date(now.setMonth(now.getMonth() - 1))
|
||||||
|
break
|
||||||
}
|
}
|
||||||
case 'year': {
|
case 'year': {
|
||||||
d = new Date(now.setFullYear(now.getFullYear() - 1))
|
d = new Date(now.setFullYear(now.getFullYear() - 1))
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Math.floor(d.getTime() / 1000)
|
return Math.floor(d.getTime() / 1000)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user