Skip to content

Commit

Permalink
fix: prepend fixedTags to tags to keep the tags for now. in the futur…
Browse files Browse the repository at this point in the history
…e the fixed tags should be implemented as intended (#94)
  • Loading branch information
navid-kalaei committed Feb 24, 2022
1 parent 01f79f8 commit bd24421
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/HomeEntityRedirector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { StatusCodes } from 'http-status-codes'
import { BASICS_ENDPOINTS } from '../api/endpoints/BasicsEndpoints'
import { BriefRootSlugEntity, RootSlugEntity } from '../utils/types'
import SidebarStatus from '../dtos/SidebarStatus'
import { convertArrayToQueryParam, convertQueryParamToString } from '../utils/utils'
import { convertArrayToQueryParam, convertQueryParamToArray, convertQueryParamToString } from '../utils/utils'


const extractTagsFromSearchQuery = (search: string): [string, string[]] => {
Expand Down Expand Up @@ -46,7 +46,8 @@ const adaptParams = (query: ParsedUrlQuery): ParsedUrlQuery => {
} = query

const search = convertQueryParamToString(searchParam)
const [newSearch, tags] = extractTagsFromSearchQuery(search)
const [newSearch, tagsFromSearchInput] = extractTagsFromSearchQuery(search)
const tags = [...convertQueryParamToArray(fixedTags), ...tagsFromSearchInput]

const optionalAdaptedParams = {
c,
Expand Down

0 comments on commit bd24421

Please sign in to comment.