From 0aebb87210c805a039a57c92d5ca5c4c968cb9dd Mon Sep 17 00:00:00 2001 From: Primakov Alexandr Alexandrovich Date: Thu, 12 Dec 2024 11:17:38 +0300 Subject: [PATCH] update get student name in attendance --- src/index.tsx | 6 +++--- src/pages/attendance/attendance.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 023fe23..cb205e5 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -14,7 +14,7 @@ export default (props) => ; let rootElement: ReactDOM.Root -export const mount = async (Сomponent, element = document.getElementById('app')) => { +export const mount = async (Component, element = document.getElementById('app')) => { let user = null; try { await keycloak.init({ onLoad: "login-required" }); @@ -26,11 +26,11 @@ export const mount = async (Сomponent, element = document.getElementById('app') const store = createStore({ user }); rootElement = ReactDOM.createRoot(element); - rootElement.render(<Сomponent store={store} />); + rootElement.render(); if(module.hot) { module.hot.accept('./app', ()=> { - rootElement.render(<Сomponent store={store} />); + rootElement.render(); }) } }; diff --git a/src/pages/attendance/attendance.tsx b/src/pages/attendance/attendance.tsx index bc74054..666bae5 100644 --- a/src/pages/attendance/attendance.tsx +++ b/src/pages/attendance/attendance.tsx @@ -29,7 +29,7 @@ export const Attendance = () => { value: student.family_name && student.given_name ? `${student.family_name} ${student.given_name}` - : student.name || student.email, + : student.name || student.email || student.preferred_username || student.family_name || student.given_name, }) }) })