fix: display error message in project settings page. (#4099)

* chore: update `project title` to `project name` in create project modal.
This commit is contained in:
Prateek Shourya 2024-04-01 13:48:12 +05:30 committed by GitHub
parent fafdac68f0
commit a771bab64c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -226,7 +226,7 @@ export const CreateProjectForm: FC<Props> = observer((props) => {
control={control}
name="name"
rules={{
required: "Title is required",
required: "Name is required",
maxLength: {
value: 255,
message: "Title should be less than 255 characters",
@ -240,7 +240,7 @@ export const CreateProjectForm: FC<Props> = observer((props) => {
value={value}
onChange={handleNameChange(onChange)}
hasError={Boolean(errors.name)}
placeholder="Project title"
placeholder="Project name"
className="w-full focus:border-blue-400"
tabIndex={1}
/>

View File

@ -232,6 +232,9 @@ export const ProjectDetailsForm: FC<IProjectDetailsForm> = (props) => {
/>
)}
/>
<span className="text-xs text-red-500">
<>{errors?.name?.message}</>
</span>
</div>
<div className="flex flex-col gap-1">
<h4 className="text-sm">Description</h4>
@ -252,7 +255,7 @@ export const ProjectDetailsForm: FC<IProjectDetailsForm> = (props) => {
)}
/>
</div>
<div className="flex w-full items-center justify-between gap-10">
<div className="flex w-full justify-between gap-10">
<div className="flex w-1/2 flex-col gap-1">
<h4 className="text-sm">Project ID</h4>
<div className="relative">
@ -297,6 +300,9 @@ export const ProjectDetailsForm: FC<IProjectDetailsForm> = (props) => {
<Info className="absolute right-2 top-2.5 h-4 w-4 text-custom-text-400" />
</Tooltip>
</div>
<span className="text-xs text-red-500">
<>{errors?.identifier?.message}</>
</span>
</div>
<div className="flex w-1/2 flex-col gap-1">
<h4 className="text-sm">Network</h4>