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:
Charles Bochet
2025-04-10 01:39:25 +02:00
committed by GitHub
parent 7bd68ad176
commit a7e6564017
28 changed files with 160 additions and 159 deletions

View File

@ -19,7 +19,7 @@ export const AvatarChip = ({
label={name}
variant={ChipVariant.Transparent}
size={size}
leftComponent={() => (
leftComponent={
<AvatarChipsLeftComponent
name={name}
LeftIcon={LeftIcon}
@ -29,7 +29,7 @@ export const AvatarChip = ({
isIconInverted={isIconInverted}
placeholderColorSeed={placeholderColorSeed}
/>
)}
}
clickable={false}
className={className}
maxWidth={maxWidth}

View File

@ -1,5 +1,5 @@
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { styled } from '@linaria/react';
import { Avatar } from '@ui/display/avatar/components/Avatar';
import { AvatarType } from '@ui/display/avatar/types/AvatarType';
import { IconComponent } from '@ui/display/icon/types/IconComponent';

View File

@ -39,7 +39,7 @@ export const LinkAvatarChip = ({
: ChipVariant.Regular
}
size={size}
leftComponent={() => (
leftComponent={
<AvatarChipsLeftComponent
name={name}
LeftIcon={LeftIcon}
@ -49,7 +49,7 @@ export const LinkAvatarChip = ({
isIconInverted={isIconInverted}
placeholderColorSeed={placeholderColorSeed}
/>
)}
}
className={className}
maxWidth={maxWidth}
/>

View File

@ -30,7 +30,7 @@ export type ChipProps = {
maxWidth?: number;
variant?: ChipVariant;
accent?: ChipAccent;
leftComponent?: (() => ReactNode) | null;
leftComponent?: ReactNode | null;
rightComponent?: (() => ReactNode) | null;
className?: string;
};
@ -146,7 +146,7 @@ export const Chip = ({
className={className}
maxWidth={maxWidth}
>
{leftComponent?.()}
{leftComponent}
{!isLabelHidden && (
<OverflowingTextWithTooltip size={size} text={label} />
)}

View File

@ -1,4 +1,4 @@
import styled from '@emotion/styled';
import { styled } from '@linaria/react';
import {
Chip,
ChipAccent,
@ -17,8 +17,6 @@ export type LinkChipProps = Omit<
onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
};
// Ideally we would use the UndecoratedLink component from @ui/navigation
// but it led to a bug probably linked to circular dependencies, which was hard to solve
const StyledLink = styled(Link)`
text-decoration: none;
`;