2021-06-09 12:26:00 +00:00
|
|
|
import React from "react";
|
|
|
|
|
2021-10-20 15:42:40 +00:00
|
|
|
interface UsernameInputProps extends React.ComponentPropsWithRef<"input"> {
|
|
|
|
label?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const UsernameInput = React.forwardRef<HTMLInputElement, UsernameInputProps>((props, ref) => (
|
2021-06-09 12:26:00 +00:00
|
|
|
// todo, check if username is already taken here?
|
|
|
|
<div>
|
|
|
|
<label htmlFor="username" className="block text-sm font-medium text-gray-700">
|
Cal 262 refactor edit teams according to the design reference (#516)
* refactored settings/team landing page
* changed team edit flow, WIP
* merge conflict fix for teams.tsx
* minor fixes to edit team, WIP
* invite-member and disband team APIs attached inside edit-team page
* added remove-member API in edit-team page, minor fixes
* minor code fix, WIP
* WIP
* add logo, bio, branding to team schema
* bio, logo, branding, slug patch API and minor code fix-- WIP
* fn to Disband team directly from the dropdown menu in settings/teams page, removed debug remnants --WIP
* Pull latest data after an action in settings/teams-edit page
* added slug conflict check at Patch time
* code clean-up
* initial change request fixes --WIP
* prop type fix and add warn button color theme --WIP
* added warn Button to Dialog
* remaining change request fixes
* added noop from react-query
* updated invited team-list design
* prettier fix for api/teams/profile
* removed noop import and added custom noop
* minor Button fix
* requested changes addressed
2021-09-06 13:22:22 +00:00
|
|
|
{props.label ? props.label : "Username"}
|
2021-06-09 12:26:00 +00:00
|
|
|
</label>
|
Cal 262 refactor edit teams according to the design reference (#516)
* refactored settings/team landing page
* changed team edit flow, WIP
* merge conflict fix for teams.tsx
* minor fixes to edit team, WIP
* invite-member and disband team APIs attached inside edit-team page
* added remove-member API in edit-team page, minor fixes
* minor code fix, WIP
* WIP
* add logo, bio, branding to team schema
* bio, logo, branding, slug patch API and minor code fix-- WIP
* fn to Disband team directly from the dropdown menu in settings/teams page, removed debug remnants --WIP
* Pull latest data after an action in settings/teams-edit page
* added slug conflict check at Patch time
* code clean-up
* initial change request fixes --WIP
* prop type fix and add warn button color theme --WIP
* added warn Button to Dialog
* remaining change request fixes
* added noop from react-query
* updated invited team-list design
* prettier fix for api/teams/profile
* removed noop import and added custom noop
* minor Button fix
* requested changes addressed
2021-09-06 13:22:22 +00:00
|
|
|
<div className="flex mt-1 rounded-md shadow-sm">
|
|
|
|
<span className="inline-flex items-center px-3 text-gray-500 border border-r-0 border-gray-300 rounded-l-sm bg-gray-50 sm:text-sm">
|
2021-09-24 15:03:28 +00:00
|
|
|
{process.env.NEXT_PUBLIC_APP_URL}/{props.label && "team/"}
|
2021-06-09 12:26:00 +00:00
|
|
|
</span>
|
2021-06-23 15:49:10 +00:00
|
|
|
<input
|
|
|
|
ref={ref}
|
|
|
|
type="text"
|
|
|
|
name="username"
|
|
|
|
id="username"
|
|
|
|
autoComplete="username"
|
|
|
|
required
|
|
|
|
{...props}
|
Cal 262 refactor edit teams according to the design reference (#516)
* refactored settings/team landing page
* changed team edit flow, WIP
* merge conflict fix for teams.tsx
* minor fixes to edit team, WIP
* invite-member and disband team APIs attached inside edit-team page
* added remove-member API in edit-team page, minor fixes
* minor code fix, WIP
* WIP
* add logo, bio, branding to team schema
* bio, logo, branding, slug patch API and minor code fix-- WIP
* fn to Disband team directly from the dropdown menu in settings/teams page, removed debug remnants --WIP
* Pull latest data after an action in settings/teams-edit page
* added slug conflict check at Patch time
* code clean-up
* initial change request fixes --WIP
* prop type fix and add warn button color theme --WIP
* added warn Button to Dialog
* remaining change request fixes
* added noop from react-query
* updated invited team-list design
* prettier fix for api/teams/profile
* removed noop import and added custom noop
* minor Button fix
* requested changes addressed
2021-09-06 13:22:22 +00:00
|
|
|
className="flex-grow block w-full min-w-0 lowercase border-gray-300 rounded-none rounded-r-sm focus:ring-black focus:border-black sm:text-sm"
|
2021-06-23 15:49:10 +00:00
|
|
|
/>
|
2021-06-09 12:26:00 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-23 15:49:10 +00:00
|
|
|
));
|
|
|
|
|
|
|
|
UsernameInput.displayName = "UsernameInput";
|
|
|
|
|
|
|
|
export { UsernameInput };
|