Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
poolsar42 committed May 30, 2023
1 parent 5cde3f9 commit 428b7ca
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions apps/console/app/routes/apps/$clientId/designer.beta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1009,24 +1009,13 @@ export const action: ActionFunction = getRollupReqFunctionErrorWrapper(
})

const updateAuth = async (fd: FormData, theme: AppTheme) => {
let heading = fd.get('heading') as string | undefined
if (!heading || heading === '') heading = undefined

let radius = fd.get('radius') as string | undefined
if (!radius || radius === '') radius = undefined

let color = fd.get('color') as string | undefined
if (!color || color === '') color = undefined

let colorDark = fd.get('colordark') as string | undefined
if (!colorDark || colorDark === '') colorDark = undefined

let graphicURL = fd.get('image') as string | undefined
if (!graphicURL || graphicURL === '') graphicURL = undefined

let providersJSON = fd.get('providers') as string | undefined
if (!providersJSON || providersJSON === '') providersJSON = undefined
const heading = fd.get('heading') as string | undefined
const radius = fd.get('radius') as string | undefined
const color = fd.get('color') as string | undefined
const colorDark = fd.get('colordark') as string | undefined
const graphicURL = fd.get('image') as string | undefined

const providersJSON = fd.get('providers') as string | undefined
const providers = providersJSON ? JSON.parse(providersJSON) : undefined

theme = {
Expand All @@ -1036,12 +1025,12 @@ export const action: ActionFunction = getRollupReqFunctionErrorWrapper(
color:
color && colorDark
? {
light: color,
dark: colorDark,
}
: theme?.color,
graphicURL: graphicURL ?? theme?.graphicURL,
providers: providers ?? theme?.providers,
light: color,
dark: colorDark,
}
: theme.color,
graphicURL: graphicURL ?? theme.graphicURL,
providers: providers ?? theme.providers,
}

const zodErrors = await AppThemeSchema.spa(theme)
Expand Down

0 comments on commit 428b7ca

Please sign in to comment.