1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-11 03:34:35 +00:00

fix(web): show display name instead of username

This commit is contained in:
Saad Jutt
2022-04-28 07:00:49 +05:00
parent 5da93f318a
commit e57443f1ed
4 changed files with 22 additions and 21 deletions

View File

@@ -15,7 +15,7 @@ const login = async (payload: { username: string; password: string }) =>
const Login = ({ getCodeOnly }: any) => {
const location = useLocation()
const appContext = useContext(AppContext)
const [username, setUserName] = useState('')
const [username, setUsername] = useState('')
const [password, setPassword] = useState('')
const [errorMessage, setErrorMessage] = useState('')
let error: boolean
@@ -57,8 +57,8 @@ const Login = ({ getCodeOnly }: any) => {
if (loggedIn) {
appContext.setLoggedIn?.(loggedIn)
appContext.setUserName?.(user.username)
appContext.setDisplayName?.(user.displayname)
appContext.setUsername?.(user.username)
appContext.setDisplayName?.(user.displayName)
}
}
@@ -101,7 +101,7 @@ const Login = ({ getCodeOnly }: any) => {
label="Username"
type="text"
variant="outlined"
onChange={(e: any) => setUserName(e.target.value)}
onChange={(e: any) => setUsername(e.target.value)}
required
/>
<TextField