Skip to content

Commit 153e560

Browse files
authored
fix(offerwall/builder): hide button close appearance details (#585)
1 parent f3c3e81 commit 153e560

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

frontend/app/components/offerwall/OfferwallBuilder.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ function AppearanceBuilder({ onRefresh }: Props) {
4848
}
4949
}}
5050
onRefresh={onRefresh}
51-
onDone={() => {
52-
uiActions.setAppearanceComplete(true)
53-
toolActions.setBuildCompleteStep('filled')
54-
}}
5551
initialIsOpen
5652
>
5753
<InputFieldset label="Text" icon={<SVGText className="w-5 h-5" />}>

frontend/app/components/redesign/components/BuilderAccordion.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { GhostButton } from './GhostButton'
88
interface BuilderAccordionProps {
99
title: string
1010
onRefresh: () => void
11-
onDone: () => void
11+
onDone?: () => void
1212
isComplete?: boolean
1313
initialIsOpen?: boolean
1414
onToggle?: (isOpen: boolean) => void
@@ -32,11 +32,6 @@ export const BuilderAccordion: React.FC<BuilderAccordionProps> = ({
3232
onToggle?.(isOpen)
3333
}
3434

35-
const handleDoneClick = () => {
36-
setIsOpen(false)
37-
onDone()
38-
}
39-
4035
return (
4136
<details
4237
open={isOpen}
@@ -78,14 +73,19 @@ export const BuilderAccordion: React.FC<BuilderAccordionProps> = ({
7873
{isOpen && (
7974
<>
8075
<Divider />
81-
<div className="flex justify-end">
82-
<ToolsSecondaryButton
83-
className="w-full xl:w-[140px]"
84-
onClick={handleDoneClick}
85-
>
86-
Done
87-
</ToolsSecondaryButton>
88-
</div>
76+
{onDone && (
77+
<div className="flex justify-end">
78+
<ToolsSecondaryButton
79+
className="w-full xl:w-[140px]"
80+
onClick={() => {
81+
setIsOpen(false)
82+
onDone()
83+
}}
84+
>
85+
Done
86+
</ToolsSecondaryButton>
87+
</div>
88+
)}
8989
</>
9090
)}
9191
</details>

0 commit comments

Comments
 (0)