mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
refactor dynamic time filter logic, let user choose any hour value in time filter params
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ const ValidateRouteParams = () => {
|
||||
accountComments?.length > 0 &&
|
||||
parseInt(accountCommentIndex) < accountComments.length);
|
||||
|
||||
const isDynamicTimeFilter = (filter: string) => /^\d+[dwmy]$/.test(filter);
|
||||
const isDynamicTimeFilter = (filter: string) => /^\d+[hdwmy]$/.test(filter);
|
||||
const isTimeFilterNameValid =
|
||||
!timeFilterName || timeFilterNames.includes(timeFilterName as any) || timeFilterName === lastVisitTimeFilterName || isDynamicTimeFilter(timeFilterName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user