mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-22 11:43:34 +03:00
Add skip option at invite team step (#7960)
Closing [#5925](https://github.com/twentyhq/twenty/issues/5925)
This commit is contained in:
parent
29bd4e5f2d
commit
6dd0ebe087
@ -27,7 +27,7 @@ export const RecordBoardHeader = () => {
|
||||
return (
|
||||
<StyledHeaderContainer id="record-board-header">
|
||||
{columnIds.map((columnId) => (
|
||||
<RecordBoardColumnHeaderWrapper columnId={columnId} />
|
||||
<RecordBoardColumnHeaderWrapper columnId={columnId} key={columnId} />
|
||||
))}
|
||||
</StyledHeaderContainer>
|
||||
);
|
||||
|
@ -25,6 +25,7 @@ import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
|
||||
import { LightButton } from '@/ui/input/button/components/LightButton';
|
||||
import { MainButton } from '@/ui/input/button/components/MainButton';
|
||||
import { TextInputV2 } from '@/ui/input/components/TextInputV2';
|
||||
import { ActionLink } from '@/ui/navigation/link/components/ActionLink';
|
||||
import { AnimatedTranslation } from '@/ui/utilities/animation/components/AnimatedTranslation';
|
||||
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
|
||||
import { OnboardingStatus } from '~/generated/graphql';
|
||||
@ -52,6 +53,10 @@ const StyledButtonContainer = styled.div`
|
||||
width: 200px;
|
||||
`;
|
||||
|
||||
const StyledActionSkipLinkContainer = styled.div`
|
||||
margin: ${({ theme }) => theme.spacing(3)} 0 0;
|
||||
`;
|
||||
|
||||
const validationSchema = z.object({
|
||||
emails: z.array(
|
||||
z.object({ email: z.union([z.literal(''), z.string().email()]) }),
|
||||
@ -150,6 +155,10 @@ export const InviteTeam = () => {
|
||||
[enqueueSnackBar, sendInvitation, setNextOnboardingStatus],
|
||||
);
|
||||
|
||||
const handleSkip = async () => {
|
||||
await onSubmit({ emails: [] });
|
||||
};
|
||||
|
||||
useScopedHotkeys(
|
||||
[Key.Enter],
|
||||
() => {
|
||||
@ -170,7 +179,7 @@ export const InviteTeam = () => {
|
||||
Get the most out of your workspace by inviting your team.
|
||||
</SubTitle>
|
||||
<StyledAnimatedContainer>
|
||||
{fields.map((field, index) => (
|
||||
{fields.map((_field, index) => (
|
||||
<Controller
|
||||
key={index}
|
||||
name={`emails.${index}.email`}
|
||||
@ -217,6 +226,9 @@ export const InviteTeam = () => {
|
||||
fullWidth
|
||||
/>
|
||||
</StyledButtonContainer>
|
||||
<StyledActionSkipLinkContainer>
|
||||
<ActionLink onClick={handleSkip}>Skip</ActionLink>
|
||||
</StyledActionSkipLinkContainer>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user