Skip to content

Commit

Permalink
🩹 Fix the appWorkingGroup opening links (#4388)
Browse files Browse the repository at this point in the history
Fix the `appWorkingGroup` opening links
  • Loading branch information
thesan committed May 30, 2023
1 parent 11d2bdf commit ad0193c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/ui/src/working-groups/model/workingGroupName.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { GroupIdToGroupParam } from '../constants'

const exceptionWorkingGroupNames = ['hr', 'marketing', 'builders', 'apps']

export const urlParamToWorkingGroupId = (name: string) => {
Expand All @@ -21,8 +23,7 @@ export const urlParamToWorkingGroupId = (name: string) => {

export const groupNameToURLParam = (name: string) => name.toLowerCase().replace(/ /g, '-')

export const urlParamToOpeningId = (name: string) => {
if (name.includes('operationsWorkingGroup')) return name
const params = name.split('-')
return `${urlParamToWorkingGroupId(params[0])}-${params[1]}`
export const urlParamToOpeningId = (param: string) => {
const [group, runtimeId] = param.split('-')
return group in GroupIdToGroupParam ? param : `${urlParamToWorkingGroupId(group)}-${runtimeId}`
}

2 comments on commit ad0193c

@vercel
Copy link

@vercel vercel bot commented on ad0193c May 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

pioneer-2 – ./

pioneer-2-joystream.vercel.app
pioneer-2.vercel.app
pioneer-2-git-dev-joystream.vercel.app

@vercel
Copy link

@vercel vercel bot commented on ad0193c May 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

pioneer-2-storybook – ./

pioneer-2-storybook-joystream.vercel.app
pioneer-2-storybook-git-dev-joystream.vercel.app
pioneer-2-storybook.vercel.app

Please sign in to comment.