Skip to content

Commit 071765b

Browse files
committed
show modal on save pref
1 parent ba32e8e commit 071765b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

libs/remix-ui/app/src/lib/remix-app/components/modals/managePreferences.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const ManagePreferencesSwitcher = (prop: {
9292
)
9393
}
9494

95-
const ManagePreferencesDialog = () => {
95+
const ManagePreferencesDialog = (props) => {
9696
const { modal } = useDialogDispatchers()
9797
const { settings } = useContext(AppContext)
9898
const [visible, setVisible] = useState<boolean>(true)
@@ -118,6 +118,7 @@ const ManagePreferencesDialog = () => {
118118
settings.updateMatomoAnalyticsChoice(true) // Always true for matomo Anonymous analytics
119119
settings.updateMatomoPerfAnalyticsChoice(switcherState.current.matPerfSwitch) // Enable/Disable Matomo Performance analytics
120120
settings.updateCopilotChoice(switcherState.current.remixAISwitch) // Enable/Disable RemixAI copilot
121+
props.savePreferencesFn()
121122
}
122123

123124
return <></>

libs/remix-ui/app/src/lib/remix-app/remix-app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ const RemixApp = (props: IRemixAppUi) => {
238238
<OriginWarning></OriginWarning>
239239
<MatomoDialog hide={!appReady} acceptAllFn={() => setShowEnterDialog(true)} managePreferencesFn={() => setShowManagePreferencesDialog(true)}></MatomoDialog>
240240
{showEnterDialog && <EnterDialog handleUserChoice={(type) => handleUserChosenType(type)}></EnterDialog>}
241-
{showManagePreferencesDialog && <ManagePreferencesDialog></ManagePreferencesDialog>}
241+
{showManagePreferencesDialog && <ManagePreferencesDialog savePreferencesFn={() => setShowEnterDialog(true)}></ManagePreferencesDialog>}
242242
<div className='d-flex flex-column'>
243243
<div className={`remixIDE ${appReady ? '' : 'd-none'}`} data-id="remixIDE">
244244
<div id="icon-panel" data-id="remixIdeIconPanel" className="custom_icon_panel iconpanel bg-light">

0 commit comments

Comments
 (0)