All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.v2.admin.resources.assets.UserProfileContext-BkGsi2EQ.js Maven / Gradle / Ivy

There is a newer version: 26.0.7
Show newest version
import{jsx as U}from"react/jsx-runtime";import{useState as r}from"react";import{e9 as h,u as p,c as x,f as y,a as A,w as S,k as w,ea as E}from"./main-C7ps2lmX.js";const u=h("UserProfileContext",void 0),j=({children:i})=>{const{adminClient:t}=p(),{realm:o}=x(),{addAlert:l,addError:c}=y(),{t:f}=A(),[d,m]=r(null),[a,P]=r(0),[g,e]=r(!1);S(()=>t.users.getProfile({realm:o}),s=>m(s),[a]);const v=async(s,n)=>{e(!0);try{return await t.users.updateProfile({...s,realm:o}),e(!1),P(a+1),l(f(n?.successMessageKey??"userProfileSuccess"),w.success),!0}catch(C){return e(!1),c(n?.errorMessageKey??"userProfileError",C),!1}};return U(u.Provider,{value:{config:d,save:v,isSaving:g},children:i})},k=()=>E(u);export{j as U,k as u};
//# sourceMappingURL=UserProfileContext-BkGsi2EQ.js.map




© 2015 - 2025 Weber Informatics LLC | Privacy Policy