Skip to content

Commit

Permalink
various fixes for pricing and message stripes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnm committed Oct 25, 2023
1 parent a6372cd commit 057d0a6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,18 @@ export const RestrictedPublicReposImport: React.FC<{
variant="warning"
>
Adjust your GitHub permissions to access your repositories.
<MessageStripe.MultiActions
<MessageStripe.Action
disabled={isLoadingGithub}
onClick={() => signInGithubClicked('public_repos')}
>
Allow public repositories
</MessageStripe.Action>
<MessageStripe.Action
onClick={() => signInGithubClicked('private_repos')}
loading={isLoadingGithub}
options={
<MessageStripe.MultiActionsItem
disabled={isLoadingGithub}
onSelect={() => signInGithubClicked('public_repos')}
>
Access only public repositories
</MessageStripe.MultiActionsItem>
}
disabled={isLoadingGithub}
>
Access all repositories
</MessageStripe.MultiActions>
Allow all repositories
</MessageStripe.Action>
</MessageStripe>
);
};
7 changes: 0 additions & 7 deletions packages/app/src/app/pages/Dashboard/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,6 @@ export const Sidebar: React.FC<SidebarProps> = ({
icon="sharing"
/>

<RowItem
name="Likes"
page="liked"
path={dashboardUrls.liked(activeTeam)}
icon="heart"
/>

{showRespositories && (
<>
<Element marginTop={4} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ export const WorkspacePlanSelection: React.FC = () => {
return null;
}

const multiplier = isYearlyInterval ? 12 : 1;
const quantity = options?.perEditor ? 1 : subscription.quantity;
const price = quantity * subscription.unitPrice * multiplier;
const price = quantity * subscription.unitPrice;

// A Paddle subscription returns the currency in uppercase EUR. A Stripe
// subscription returns the currency in lowercase usd. The formatCurrency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,7 @@ export const OnDismissWithActionSpaceBetween = () => (
export const WithMultipleActions = () => (
<MessageStripe variant="warning" justify="space-between" onDismiss={() => {}}>
Adjust your GitHub permissions to access your repositories.
<MessageStripe.MultiActions
options={
<>
<MessageStripe.MultiActionsItem onSelect={() => {}}>
Access all repositories
</MessageStripe.MultiActionsItem>
<MessageStripe.MultiActionsItem onSelect={() => {}}>
Access only public repositories
</MessageStripe.MultiActionsItem>
</>
}
>
Review GitHub permissions
</MessageStripe.MultiActions>
<MessageStripe.Action>Option 1</MessageStripe.Action>
<MessageStripe.Action>Option 2</MessageStripe.Action>
</MessageStripe>
);
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const MessageStripe = ({
}

return (
<Text size={13} lineHeight="16px">
<Text size={13} css={{ flexGrow: 1 }} lineHeight="16px">
{child}
</Text>
);
Expand Down

0 comments on commit 057d0a6

Please sign in to comment.