Skip to content

Commit

Permalink
style(feeds): comments not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanabaroa committed Jan 26, 2024
1 parent 6ccbb2f commit 80f19b4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/hooks/feeds/feeds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,20 +253,15 @@ function useFeedNames(
const getSortType = (sortType?: string, newerThan?: number) => {
if (!sortType) {
sortType = 'hot'
}
if (newerThan && (sortType === 'topAll' || sortType === 'controversialAll')) {
} else if (newerThan && (sortType === 'topAll' || sortType === 'controversialAll')) {
let time: string | undefined
if (newerThan <= 60 * 60 * 24) {
// 1 day
time = 'Day'
} else if (newerThan <= 60 * 60 * 24 * 7) {
// 1 week
time = 'Week'
} else if (newerThan <= 60 * 60 * 24 * 31) {
// 1 month
time = 'Month'
} else if (newerThan <= 60 * 60 * 24 * 365) {
// 1 year
time = 'Year'
}
if (time) {
Expand Down

0 comments on commit 80f19b4

Please sign in to comment.