fix(core): wrong billing information display (#9117)

close AF-1935 AF-1933

fix(core): wrong billing information display

fix(core): add reminder for no cloud workspace in upgrade to team page
This commit is contained in:
JimmFly
2024-12-12 06:16:31 +00:00
parent 595125ebb3
commit c0e0b12857
5 changed files with 19 additions and 5 deletions
@@ -119,7 +119,7 @@ const TeamCard = () => {
workspaceSubscriptionService,
]);
const expiration = teamSubscription?.end;
const expiration = teamSubscription?.canceledAt;
const nextBillingDate = teamSubscription?.nextBillAt;
const recurring = teamSubscription?.recurring;
@@ -233,15 +233,21 @@ const WorkspaceSelector = ({
return (
<div>
{cloudWorkspaces.length > 0 &&
{cloudWorkspaces.length > 0 ? (
cloudWorkspaces.map(workspace => (
<WorkspaceItem
key={workspace.id}
meta={workspace}
onSelect={handleSelect}
/>
))}
{cloudWorkspaces.length > 0 && <Divider size="thinner" />}
))
) : (
<div className={styles.noWorkspaceItem}>
{t['com.affine.upgrade-to-team-page.no-workspace-available']()}
</div>
)}
<Divider size="thinner" />
<MenuItem
className={styles.createWorkspaceItem}
prefix={<NewPageIcon className={styles.itemIcon} fontSize={28} />}
@@ -57,6 +57,13 @@ export const createWorkspaceItem = style({
gap: '12px',
});
export const noWorkspaceItem = style({
padding: '4px 12px',
fontSize: cssVar('fontSm'),
fontWeight: 500,
color: cssVarV2('text/secondary'),
});
export const itemContent = style({
fontSize: cssVar('fontSm'),
fontWeight: 500,