Skip to content

Commit

Permalink
Merge pull request #78 from CS3219-AY2425S1/titus/remove-update-for-u…
Browse files Browse the repository at this point in the history
…sername

fix: remove update for username
  • Loading branch information
bensohh authored Nov 13, 2024
2 parents fbafcdd + 9b0c302 commit 9f5833b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions apps/frontend/src/app/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import {
Avatar,
Button,
Col,
Divider,
Form,
Input,
Layout,
message,
Row,
Tooltip,
} from "antd";
import { Content } from "antd/es/layout/layout";
import "./styles.scss";
import { EditOutlined, SaveOutlined } from "@ant-design/icons";
import { useEffect, useState, useLayoutEffect } from "react";
import { useEffect, useState } from "react";
import {
UpdateUser,
ValidateUser,
Expand Down Expand Up @@ -117,14 +117,14 @@ const ProfilePage = (props: ProfilePageProps): JSX.Element => {
<Form.Item
name="username"
label="Username"
tooltip="Unmodifable to prevent confusion in other users history when your username changes"
rules={[
{
required: true,
message: "Please enter valid username!",
},
]}
>
<Input name="username" />
<Input name="username" disabled />
</Form.Item>
</Col>
<Col span={12}>
Expand All @@ -144,7 +144,11 @@ const ProfilePage = (props: ProfilePageProps): JSX.Element => {
</Row>
<Row gutter={16}>
<Col span={12}>
<Form.Item name="password" label="Password">
<Form.Item
name="password"
label="Password"
tooltip="Password is not updated if this field is left empty"
>
<Input.Password
name="password"
type="password"
Expand Down

0 comments on commit 9f5833b

Please sign in to comment.