( time: SearchTimeKey, )
| 51 | |
| 52 | // `AllTime` is the default and is omitted from the URL to keep links clean. |
| 53 | export const getSearchTimeQueryParam = ( |
| 54 | time: SearchTimeKey, |
| 55 | ): { time?: string } => |
| 56 | time === defaultSearchTime ? {} : { time: searchTimeUrlSlug[time] }; |
| 57 | |
| 58 | const searchPostTypeUrlSlug: Partial<Record<PostType, string>> = { |
| 59 | [PostType.Article]: 'article', |
no outgoing calls
no test coverage detected