mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-06 09:59:00 +02:00
🏗️ Move account settings (#1814)
This commit is contained in:
parent
2889967726
commit
bfa3b0818e
34 changed files with 41 additions and 32 deletions
|
@ -84,7 +84,7 @@ const FAQ = async ({ t }: { t: TFunction<"pricing"> }) => {
|
|||
a: (
|
||||
<Link
|
||||
className="text-link"
|
||||
href={linkToApp("/settings/billing")}
|
||||
href={linkToApp("/account/billing")}
|
||||
/>
|
||||
),
|
||||
b: <strong />,
|
||||
|
@ -110,7 +110,7 @@ const FAQ = async ({ t }: { t: TFunction<"pricing"> }) => {
|
|||
a: (
|
||||
<Link
|
||||
className="text-link"
|
||||
href={linkToApp("/settings/billing")}
|
||||
href={linkToApp("/account/billing")}
|
||||
/>
|
||||
),
|
||||
b: <strong />,
|
||||
|
|
|
@ -157,7 +157,7 @@ export function PriceTables() {
|
|||
</TabsContent>
|
||||
<hr />
|
||||
<Button asChild variant="primary" className="w-full">
|
||||
<Link href={linkToApp("/settings/billing")}>
|
||||
<Link href={linkToApp("/account/billing")}>
|
||||
<Trans
|
||||
t={t}
|
||||
ns="pricing"
|
||||
|
|
|
@ -28,7 +28,7 @@ If you haven't jumped aboard yet, the launch price for Rallly Pro is still up fo
|
|||
**As an early adopter, you will not be impacted by future price increases**, so you will be benefitting from significantly reduced rates once more features are added.
|
||||
If you haven't already, you should check out the new [feedback portal](https://feedback.rallly.co) to see what features are coming next.
|
||||
|
||||
Ready to go Pro? You can upgrade from your [billing page](https://app.rallly.co/settings/billing).
|
||||
Ready to go Pro? You can upgrade from your [billing page](https://app.rallly.co/account/billing).
|
||||
|
||||
### Pricing Updates
|
||||
|
||||
|
|
|
@ -56,6 +56,21 @@ const nextConfig = {
|
|||
destination: "/api/notifications/unsubscribe",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/settings/profile",
|
||||
destination: "/account/profile",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/settings/preferences",
|
||||
destination: "/account/preferences",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/settings/billing",
|
||||
destination: "/account/billing",
|
||||
permanent: true,
|
||||
},
|
||||
];
|
||||
},
|
||||
devIndicators: {
|
||||
|
|
|
@ -13,19 +13,19 @@ export function SettingsLayout({ children }: { children: React.ReactNode }) {
|
|||
return (
|
||||
<Tabs value={pathname}>
|
||||
<TabsList>
|
||||
<TabsTrigger asChild value="/settings/profile">
|
||||
<Link href="/settings/profile">
|
||||
<TabsTrigger asChild value="/account/profile">
|
||||
<Link href="/account/profile">
|
||||
<Trans i18nKey="profile" defaults="Profile" />
|
||||
</Link>
|
||||
</TabsTrigger>
|
||||
<TabsTrigger asChild value="/settings/preferences">
|
||||
<Link href="/settings/preferences">
|
||||
<TabsTrigger asChild value="/account/preferences">
|
||||
<Link href="/account/preferences">
|
||||
<Trans i18nKey="preferences" defaults="Preferences" />
|
||||
</Link>
|
||||
</TabsTrigger>
|
||||
<IfCloudHosted>
|
||||
<TabsTrigger asChild value="/settings/billing">
|
||||
<Link href="/settings/billing">
|
||||
<TabsTrigger asChild value="/account/billing">
|
||||
<Link href="/account/billing">
|
||||
<Trans i18nKey="billing" defaults="Billing" />
|
||||
</Link>
|
||||
</TabsTrigger>
|
|
@ -17,8 +17,8 @@ export function NavUser({
|
|||
const pathname = usePathname();
|
||||
return (
|
||||
<Link
|
||||
href="/settings/profile"
|
||||
data-state={pathname.startsWith("/settings") ? "active" : "inactive"}
|
||||
href="/account/profile"
|
||||
data-state={pathname.startsWith("/account") ? "active" : "inactive"}
|
||||
className="group relative flex w-full items-center gap-3 rounded-md p-3 text-sm hover:bg-gray-200 data-[state=active]:bg-gray-200"
|
||||
>
|
||||
<OptimizedAvatarImage size="md" src={image} name={name} />
|
||||
|
|
|
@ -36,7 +36,7 @@ export default async function Layout({
|
|||
className="rounded-full"
|
||||
size="icon"
|
||||
>
|
||||
<Link href="/settings/profile">
|
||||
<Link href="/account/profile">
|
||||
<OptimizedAvatarImage
|
||||
src={user.image}
|
||||
name={user.name}
|
||||
|
|
|
@ -125,7 +125,7 @@ export default async function Page() {
|
|||
</h2>
|
||||
<TileGrid>
|
||||
<Tile asChild>
|
||||
<Link href="/settings/profile">
|
||||
<Link href="/account/profile">
|
||||
<ProfilePageIcon />
|
||||
<TileTitle>
|
||||
<Trans i18nKey="profile" defaults="Profile" />
|
||||
|
@ -134,7 +134,7 @@ export default async function Page() {
|
|||
</Tile>
|
||||
|
||||
<Tile asChild>
|
||||
<Link href="/settings/preferences">
|
||||
<Link href="/account/preferences">
|
||||
<PreferencesPageIcon />
|
||||
<TileTitle>
|
||||
<Trans i18nKey="preferences" defaults="Preferences" />
|
||||
|
@ -143,7 +143,7 @@ export default async function Page() {
|
|||
</Tile>
|
||||
<IfCloudHosted>
|
||||
<Tile asChild>
|
||||
<Link href="/settings/billing">
|
||||
<Link href="/account/billing">
|
||||
<BillingPageIcon />
|
||||
<TileTitle>
|
||||
<Trans i18nKey="billing" defaults="Billing" />
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { redirect } from "next/navigation";
|
||||
|
||||
import { ProfilePicture } from "@/app/[locale]/(space)/settings/profile/profile-picture";
|
||||
import { ProfilePicture } from "@/app/[locale]/(space)/account/profile/profile-picture";
|
||||
import { requireUser } from "@/auth/queries";
|
||||
import { Logo } from "@/components/logo";
|
||||
import { Trans } from "@/components/trans";
|
||||
|
|
|
@ -11,7 +11,7 @@ export function createStripePortalSessionHandler(path = "") {
|
|||
return async (request: NextRequest) => {
|
||||
const sessionId = request.nextUrl.searchParams.get("session_id");
|
||||
const returnPath =
|
||||
request.nextUrl.searchParams.get("return_path") ?? "/settings/billing";
|
||||
request.nextUrl.searchParams.get("return_path") ?? "/account/billing";
|
||||
|
||||
let customerId: string | undefined;
|
||||
|
||||
|
|
|
@ -72,5 +72,5 @@ export const GET = async (request: NextRequest) => {
|
|||
|
||||
await handleEmailChange(token);
|
||||
|
||||
return NextResponse.redirect(new URL("/settings/profile", request.url));
|
||||
return NextResponse.redirect(new URL("/account/profile", request.url));
|
||||
};
|
||||
|
|
|
@ -175,7 +175,7 @@ export function PayWallDialog({ children, ...forwardedProps }: DialogProps) {
|
|||
<Link
|
||||
onClick={() => dialog.dismiss()}
|
||||
className="text-link"
|
||||
href="/settings/billing"
|
||||
href="/account/billing"
|
||||
/>
|
||||
),
|
||||
}}
|
||||
|
|
|
@ -76,10 +76,7 @@ export const UserDropdown = ({ className }: { className?: string }) => {
|
|||
</DropdownMenuItem>
|
||||
<IfAuthenticated>
|
||||
<DropdownMenuItem asChild={true}>
|
||||
<Link
|
||||
href="/settings/profile"
|
||||
className="flex items-center gap-x-2"
|
||||
>
|
||||
<Link href="/account/profile" className="flex items-center gap-x-2">
|
||||
<UserIcon className="size-4 text-muted-foreground" />
|
||||
<Trans i18nKey="profile" defaults="Profile" />
|
||||
</Link>
|
||||
|
@ -87,7 +84,7 @@ export const UserDropdown = ({ className }: { className?: string }) => {
|
|||
</IfAuthenticated>
|
||||
<DropdownMenuItem asChild={true}>
|
||||
<Link
|
||||
href="/settings/preferences"
|
||||
href="/account/preferences"
|
||||
className="flex items-center gap-x-2"
|
||||
>
|
||||
<Settings2Icon className="size-4 text-muted-foreground" />
|
||||
|
@ -96,10 +93,7 @@ export const UserDropdown = ({ className }: { className?: string }) => {
|
|||
</DropdownMenuItem>
|
||||
<IfCloudHosted>
|
||||
<DropdownMenuItem asChild={true}>
|
||||
<Link
|
||||
href="/settings/billing"
|
||||
className="flex items-center gap-x-2"
|
||||
>
|
||||
<Link href="/account/billing" className="flex items-center gap-x-2">
|
||||
<CreditCardIcon className="size-4 text-muted-foreground" />
|
||||
<Trans i18nKey="Billing" defaults="Billing" />
|
||||
</Link>
|
||||
|
|
|
@ -107,15 +107,15 @@ export function CommandMenu() {
|
|||
<CommandGroup
|
||||
heading={<Trans i18nKey="settings" defaults="Settings" />}
|
||||
>
|
||||
<CommandItem onSelect={() => handleSelect("/settings/profile")}>
|
||||
<CommandItem onSelect={() => handleSelect("/account/profile")}>
|
||||
<ProfilePageIcon size="sm" />
|
||||
<NavigationCommandLabel label={t("profile")} />
|
||||
</CommandItem>
|
||||
<CommandItem onSelect={() => handleSelect("/settings/preferences")}>
|
||||
<CommandItem onSelect={() => handleSelect("/account/preferences")}>
|
||||
<PreferencesPageIcon size="sm" />
|
||||
<NavigationCommandLabel label={t("preferences")} />
|
||||
</CommandItem>
|
||||
<CommandItem onSelect={() => handleSelect("/settings/billing")}>
|
||||
<CommandItem onSelect={() => handleSelect("/account/billing")}>
|
||||
<BillingPageIcon size="sm" />
|
||||
<NavigationCommandLabel label={t("billing")} />
|
||||
</CommandItem>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue