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