Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ GLobal open orders checker in Admin -> show toast, count badge over open orders
Server actions errors - show friendly error message in modal / parallel route -
language switch in menu - non-free tiers
360 view?
pricing - nm scans a month
info icon on Price card
pricing - number of scans per month
info icon on Price card
/docs route - GitBook? https://docusaurus.io/docs/playground?
custom layouts
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-menu",
"version": "0.0.72",
"version": "0.0.73",
"private": true,
"type": "module",
"scripts": {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/app/sign-up/[[...sign-up]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default async function SignUpPage(props: { searchParams: SearchParams })

return (
<SplitScreenContainer
showSignInLink={true}
mainComponent={
<SignUp
appearance={{
Expand Down
12 changes: 11 additions & 1 deletion src/components/SplitScreenContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SignedIn, UserButton } from '@clerk/nextjs';
import { SignedIn, SignedOut, UserButton } from '@clerk/nextjs';
import Link from 'next/link';
import { type ReactNode } from 'react';
import { AppVersion } from '~/components/AppVersion';
Expand All @@ -9,6 +9,7 @@ import { ThemeSwitch } from '~/components/ThemeSwitch';
import { ROUTES } from '~/lib/routes';

export function SplitScreenContainer(props: {
showSignInLink?: boolean;
title: string;
subtitle: string;
mainComponent: ReactNode;
Expand Down Expand Up @@ -42,6 +43,15 @@ export function SplitScreenContainer(props: {
/>
</div>
</SignedIn>
{props.showSignInLink && (
<SignedOut>
<div className="ml-auto flex items-center-safe">
<Link className="blue-link sm:mr-14" href={ROUTES.signIn}>
I already have an account
</Link>
</div>
</SignedOut>
)}
</nav>
</div>
<div className="flex flex-col flex-nowrap">
Expand Down
2 changes: 1 addition & 1 deletion src/domain/landing-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const sections: Record<string, Section> = {
id: 'pricing',
header: {
label: 'Pricing',
title: 'Plans for teams of all sizes',
title: 'Plans for any business size',
secondary: 'No strings attached. Upgrade, downgrade or cancel instantly, anytime.',
},
},
Expand Down
6 changes: 5 additions & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ export default clerkMiddleware(

// If the user is signed in and accessing the /my route, redirect them
// to their actual dashboard URL if possible.
if (userId && isMyRoute(req)) {
if (isMyRoute(req)) {
if (!userId) {
return redirectTo(req, ROUTES.signIn);
}

if (!orgId) {
console.log(`DBG-MDLW [/my] Redirecting to ${ROUTES.onboardAddOrg} - no orgId`);
return redirectTo(req, ROUTES.onboardAddOrg);
Expand Down