💄 Update billing page and refine ui components (#830)

This commit is contained in:
Luke Vella 2023-08-29 17:29:26 +01:00 committed by GitHub
parent 1b100481a0
commit d261ef0d59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 321 additions and 238 deletions

View file

@ -11,7 +11,6 @@ import {
UserIcon,
UserPlusIcon,
} from "@rallly/icons";
import { Badge } from "@rallly/ui/badge";
import { Button } from "@rallly/ui/button";
import {
DropdownMenu,
@ -25,27 +24,11 @@ import Link from "next/link";
import { Trans } from "@/components/trans";
import { CurrentUserAvatar } from "@/components/user";
import { usePlan } from "@/contexts/plan";
import { Plan } from "@/contexts/plan";
import { isFeedbackEnabled } from "@/utils/constants";
import { IfAuthenticated, IfGuest, useUser } from "./user-provider";
const Plan = () => {
const plan = usePlan();
if (plan === "paid") {
return (
<Badge>
<Trans i18nKey="planPro" defaults="Pro" />
</Badge>
);
}
return (
<Badge variant="secondary">
<Trans i18nKey="planFree" defaults="Free" />
</Badge>
);
};
export const UserDropdown = () => {
const { user } = useUser();
return (