Skip to content

Commit 143c043

Browse files
committed
remove demo config
1 parent 962e876 commit 143c043

File tree

5 files changed

+2
-29
lines changed

5 files changed

+2
-29
lines changed

packages/backend/src/graphql/mutations/duplicate-flow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ const duplicateFlow: MutationResolvers['duplicateFlow'] = async (
9090

9191
// duplicate the flow with the previous config (only keep notification frequency)
9292
delete prevConfig['duplicateCount']
93-
delete prevConfig['demoConfig']
9493
delete prevConfig['templateConfig']
94+
delete prevConfig['showSurvey']
9595

9696
const duplicatedFlow = await context.currentUser
9797
.$relatedQuery('flows', trx)

packages/backend/src/graphql/mutations/update-flow-config.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
import type {
2-
IFlowConfig,
3-
IFlowDemoConfig,
4-
IFlowErrorConfig,
5-
} from '@plumber/types'
1+
import type { IFlowConfig, IFlowErrorConfig } from '@plumber/types'
62

73
import Context from '@/types/express/context'
84

95
type Params = {
106
input: {
117
id: string
128
notificationFrequency: IFlowErrorConfig['notificationFrequency']
13-
hasLoadedOnce: IFlowDemoConfig['hasLoadedOnce']
149
showSurvey: boolean
1510
}
1611
}
@@ -38,14 +33,6 @@ const updateFlowConfig = async (
3833
}
3934
}
4035

41-
// TODO (mal): remove demo config
42-
// if (params.input.hasLoadedOnce !== undefined) {
43-
// newConfig.demoConfig = {
44-
// ...newConfig.demoConfig, // If ever undefined (should never be), it gets set to an empty object first
45-
// hasLoadedOnce: params.input.hasLoadedOnce,
46-
// }
47-
// }
48-
4936
if (params.input.showSurvey !== undefined) {
5037
newConfig.showSurvey = params.input.showSurvey
5138
}

packages/backend/src/graphql/schema.graphql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ type Flow {
357357
type FlowConfig {
358358
errorConfig: FlowErrorConfig
359359
duplicateCount: Int
360-
demoConfig: FlowDemoConfig
361360
templateConfig: FlowTemplateConfig
362361
showSurvey: Boolean
363362
}
@@ -366,11 +365,6 @@ type FlowErrorConfig {
366365
notificationFrequency: NotificationFrequency!
367366
}
368367

369-
type FlowDemoConfig {
370-
hasLoadedOnce: Boolean!
371-
videoId: String!
372-
}
373-
374368
type FlowTemplateConfig {
375369
templateId: String!
376370
formId: String
@@ -449,7 +443,6 @@ enum NotificationFrequency {
449443
input UpdateFlowConfigInput {
450444
id: String!
451445
notificationFrequency: NotificationFrequency
452-
hasLoadedOnce: Boolean
453446
showSurvey: Boolean
454447
}
455448

packages/frontend/src/components/FlowRow/DemoFlowModal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ interface DemoFlowModalProps {
1212

1313
export default function DemoFlowModal(props: DemoFlowModalProps): ReactElement {
1414
const { onClose, demoVideoDetails } = props
15-
// fallback to default demo video to display for GGWP v1
1615
const { url, title } = demoVideoDetails ?? {}
1716

1817
return (

packages/types/index.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ export interface IFlowConfig {
172172
rejectIfOverMaxQps?: boolean
173173
errorConfig?: IFlowErrorConfig
174174
duplicateCount?: number
175-
demoConfig?: IFlowDemoConfig
176175
templateConfig?: IFlowTemplateConfig
177176
showSurvey?: boolean
178177
}
@@ -181,11 +180,6 @@ export interface IFlowErrorConfig {
181180
notificationFrequency: 'once_per_day' | 'always'
182181
}
183182

184-
export interface IFlowDemoConfig {
185-
hasLoadedOnce: boolean
186-
videoId: string
187-
}
188-
189183
export interface IFlowTemplateConfig {
190184
templateId: string
191185
formId?: string

0 commit comments

Comments
 (0)