@@ -65,7 +65,7 @@ interface AdminViewProps {
6565 profile : ProfileData ;
6666 links : LinkData [ ] ;
6767 theme : ThemeConfig ;
68- onProfileUpdate : ( profile : ProfileData ) => void ;
68+ onProfileUpdate : ( profile : ProfileData ) => void | Promise < void > ;
6969 onLinksUpdate : ( links : LinkData [ ] ) => void ;
7070 onThemeChange : ( theme : ThemeConfig ) => void ;
7171 onLogout : ( ) => void ;
@@ -136,7 +136,7 @@ export const AdminView = ({
136136 } ;
137137
138138 const handleSaveIntegrations = ( ) => {
139- onProfileUpdate ( { ...profile , googleAnalyticsId : gaId . trim ( ) || undefined } ) ;
139+ void onProfileUpdate ( { ...profile , googleAnalyticsId : gaId . trim ( ) || undefined } ) ;
140140 setGaSaved ( true ) ;
141141 setTimeout ( ( ) => setGaSaved ( false ) , 2500 ) ;
142142 } ;
@@ -215,7 +215,7 @@ export const AdminView = ({
215215 < div className = "admin-main-column" >
216216 < ProfileSection
217217 profile = { profile }
218- onProfileUpdate = { onProfileUpdate }
218+ onProfileUpdate = { ( nextProfile ) => { void onProfileUpdate ( nextProfile ) ; } }
219219 />
220220 </ div >
221221 < aside className = "admin-side-panel admin-checklist-panel" >
@@ -342,7 +342,9 @@ export const AdminView = ({
342342 < PrivacySettings
343343 privacyPolicyUrl = { profile . privacyPolicyUrl }
344344 cookiePolicyUrl = { profile . cookiePolicyUrl }
345- onEditLegalLinks = { ( ) => setActiveTab ( "profile" ) }
345+ onLegalPolicyUpdate = { ( { privacyPolicyUrl, cookiePolicyUrl } ) =>
346+ onProfileUpdate ( { ...profile , privacyPolicyUrl, cookiePolicyUrl } )
347+ }
346348 />
347349 </ TabsContent >
348350 </ Tabs >
0 commit comments