Make token update synchronous on FE (#11486)
1. Removing tokenPair internal variable of ApolloFactory. We will relay on cookieStorage 2. setting the cookie explicitely instead of only relaying on recoil cookieEffect which is too late
This commit is contained in:
@ -2,7 +2,7 @@ import { useMemo } from 'react';
|
||||
|
||||
import { FieldEmailsValue } from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { ExpandableList } from '@/ui/layout/expandable-list/components/ExpandableList';
|
||||
import styled from '@emotion/styled';
|
||||
import { styled } from '@linaria/react';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { RoundedLink } from 'twenty-ui/navigation';
|
||||
import { THEME_COMMON } from 'twenty-ui/theme';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { FieldMultiSelectValue } from '@/object-record/record-field/types/FieldMetadata';
|
||||
import styled from '@emotion/styled';
|
||||
import { SelectOption } from 'twenty-ui/input';
|
||||
import { styled } from '@linaria/react';
|
||||
import { Tag } from 'twenty-ui/components';
|
||||
import { SelectOption } from 'twenty-ui/input';
|
||||
import { THEME_COMMON } from 'twenty-ui/theme';
|
||||
|
||||
const spacing1 = THEME_COMMON.spacing(1);
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
import styled from '@emotion/styled';
|
||||
import React, { useMemo } from 'react';
|
||||
|
||||
import { FieldPhonesValue } from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { ExpandableList } from '@/ui/layout/expandable-list/components/ExpandableList';
|
||||
|
||||
import { DEFAULT_PHONE_CALLING_CODE } from '@/object-record/record-field/meta-types/input/components/PhonesFieldInput';
|
||||
import { styled } from '@linaria/react';
|
||||
import { parsePhoneNumber } from 'libphonenumber-js';
|
||||
import { logError } from '~/utils/logError';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { RoundedLink } from 'twenty-ui/navigation';
|
||||
import { THEME_COMMON } from 'twenty-ui/theme';
|
||||
import { logError } from '~/utils/logError';
|
||||
|
||||
type PhonesDisplayProps = {
|
||||
value?: FieldPhonesValue;
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import { useInlineCell } from '@/object-record/record-inline-cell/hooks/useInlineCell';
|
||||
import { OverflowingTextWithTooltip } from 'twenty-ui/display';
|
||||
|
||||
type TextDisplayProps = {
|
||||
@ -7,13 +6,11 @@ type TextDisplayProps = {
|
||||
};
|
||||
|
||||
export const TextDisplay = ({ text, displayedMaxRows }: TextDisplayProps) => {
|
||||
const { isInlineCellInEditMode } = useInlineCell();
|
||||
return (
|
||||
<OverflowingTextWithTooltip
|
||||
text={text}
|
||||
displayedMaxRows={displayedMaxRows}
|
||||
isTooltipMultiline={true}
|
||||
hideTooltip={isInlineCellInEditMode}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@ -1,19 +1,8 @@
|
||||
import styled from '@emotion/styled';
|
||||
import { MouseEvent } from 'react';
|
||||
|
||||
import { LinkType, RoundedLink, SocialLink } from 'twenty-ui/navigation';
|
||||
import { checkUrlType } from '~/utils/checkUrlType';
|
||||
import { EllipsisDisplay } from './EllipsisDisplay';
|
||||
import { LinkType, RoundedLink, SocialLink } from 'twenty-ui/navigation';
|
||||
|
||||
const StyledRawLink = styled(RoundedLink)`
|
||||
overflow: hidden;
|
||||
|
||||
a {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
`;
|
||||
|
||||
type URLDisplayProps = {
|
||||
value: string | null;
|
||||
@ -48,7 +37,7 @@ export const URLDisplay = ({ value }: URLDisplayProps) => {
|
||||
}
|
||||
return (
|
||||
<EllipsisDisplay>
|
||||
<StyledRawLink
|
||||
<RoundedLink
|
||||
href={absoluteUrl}
|
||||
onClick={handleClick}
|
||||
label={displayedValue}
|
||||
|
||||
Reference in New Issue
Block a user