mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-27 01:19:00 +02:00
feat: prepopulate new user (#10057)
This commit is contained in:
parent
e3e51f297d
commit
08e6c77d9c
@ -13,11 +13,15 @@ import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
import { GO_BACK } from 'constants/navigate';
|
||||
import { SeatCostWarning } from './SeatCostWarning/SeatCostWarning.tsx';
|
||||
import useQueryParams from 'hooks/useQueryParams.ts';
|
||||
|
||||
const CreateUser = () => {
|
||||
const { setToastApiError } = useToast();
|
||||
const { uiConfig } = useUiConfig();
|
||||
const navigate = useNavigate();
|
||||
const params = useQueryParams();
|
||||
const initialName = params.get('name') || '';
|
||||
const initialEmail = params.get('email') || '';
|
||||
const {
|
||||
name,
|
||||
setName,
|
||||
@ -32,7 +36,7 @@ const CreateUser = () => {
|
||||
validateEmail,
|
||||
errors,
|
||||
clearErrors,
|
||||
} = useAddUserForm();
|
||||
} = useAddUserForm(initialName, initialEmail);
|
||||
const [showConfirm, setShowConfirm] = useState(false);
|
||||
const [inviteLink, setInviteLink] = useState('');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user