diff --git a/demo/src/app.jsx b/demo/src/app.jsx index 9351ca1f9..31414632f 100644 --- a/demo/src/app.jsx +++ b/demo/src/app.jsx @@ -335,7 +335,7 @@ function AppContent({ language, onLanguageClick }) { instance: null, error: null, }); - const [user, setUser] = useState(null); + const [userProfile, setUserProfile] = useState(null); const [authenticationRouterError, setAuthenticationRouterError] = useState(null); const [showAuthenticationRouterLoginState, setShowAuthenticationRouterLoginState] = useState(false); @@ -413,7 +413,7 @@ function AppContent({ language, onLanguageClick }) { const dispatch = (e) => { if (e.type === 'USER') { - setUser(e.user); + setUserProfile(e.user?.profile ?? null); } else if ( e.type === 'UNAUTHORIZED_USER_INFO' || e.type === 'USER_VALIDATION_ERROR' || @@ -628,95 +628,100 @@ function AppContent({ language, onLanguageClick }) { ); const defaultTab = ( -
+
Connected -
-
+
{testIcons()} - - - -
- - - - - - - - - o.label} - getItemLabelSecondary={(o) => o.labelSecondary} - getItemId={(o) => o.id} - handleClose={() => setOpenMultiChoiceDialog(false)} - handleValidate={() => setOpenMultiChoiceDialog(false)} - titleId="Checkbox list" - divider - secondaryAction={secondaryAction} - addSelectAllCheckbox - onItemClick={(item) => console.log('clicked', item)} - isItemClickable={(item) => item.id === 'ney' || item.id === 'john'} - /> +
+ + + +
+
+
+ + + + + +
+
+
+ + o.label} + getItemLabelSecondary={(o) => o.labelSecondary} + getItemId={(o) => o.id} + handleClose={() => setOpenMultiChoiceDialog(false)} + handleValidate={() => setOpenMultiChoiceDialog(false)} + titleId="Checkbox list" + divider + secondaryAction={secondaryAction} + addSelectAllCheckbox + onItemClick={(item) => console.log('clicked', item)} + isItemClickable={(item) => item.id === 'ney' || item.id === 'john'} + /> - - o.label} - getItemLabelSecondary={(o) => o.labelSecondary} - getItemId={(o) => o.id} - handleClose={() => setOpenDraggableMultiChoiceDialog(false)} - handleValidate={() => setOpenDraggableMultiChoiceDialog(false)} - titleId="Draggable checkbox list" - divider - secondaryAction={secondaryAction} - isDndActive - onDragEnd={({ source, destination }) => { - if (destination !== null && source.index !== destination.index) { - const res = [...checkBoxListOption]; - const [item] = res.splice(source.index, 1); - res.splice(destination ? destination.index : checkBoxListOption.length, 0, item); - setCheckBoxListOption(res); - } - }} - addSelectAllCheckbox - onItemClick={(item) => console.log('clicked', item)} - isItemClickable={(item) => item.id.indexOf('i') >= 0} - sx={{ - items: (item) => ({ - label: { - color: item.id.indexOf('i') >= 0 ? 'blue' : 'red', - }, - }), - }} - /> + + o.label} + getItemLabelSecondary={(o) => o.labelSecondary} + getItemId={(o) => o.id} + handleClose={() => setOpenDraggableMultiChoiceDialog(false)} + handleValidate={() => setOpenDraggableMultiChoiceDialog(false)} + titleId="Draggable checkbox list" + divider + secondaryAction={secondaryAction} + isDndActive + onDragEnd={({ source, destination }) => { + if (destination !== null && source.index !== destination.index) { + const res = [...checkBoxListOption]; + const [item] = res.splice(source.index, 1); + res.splice(destination ? destination.index : checkBoxListOption.length, 0, item); + setCheckBoxListOption(res); + } + }} + addSelectAllCheckbox + onItemClick={(item) => console.log('clicked', item)} + isItemClickable={(item) => item.id.indexOf('i') >= 0} + sx={{ + items: (item) => ({ + label: { + color: item.id.indexOf('i') >= 0 ? 'blue' : 'red', + }, + }), + }} + /> +
+
+
@@ -933,7 +939,7 @@ function AppContent({ language, onLanguageClick }) {
baz
- {user !== null ? ( + {userProfile !== null ? (
setTabIndex(newTabIndex)}>