-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use modal to create/select org, after sign up/sign in
- Loading branch information
1 parent
f626194
commit dd7ab94
Showing
9 changed files
with
57 additions
and
165 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
pages/organizations/profile/[[...organization-profile]].tsx
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
pages/organizations/switcher/[[...organization-switcher]].tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { OrganizationList, UserButton } from "@clerk/nextjs"; | ||
import { HelpDropdown } from "../../../ui/MenuBar/HelpDropdown"; | ||
import { clerkUrls } from "./ClerkAuthSessionChecker"; | ||
|
||
export default function ClerkOrgModal() { | ||
return ( | ||
<div className="h-screen w-screen flex flex-row"> | ||
<div className="flex flex-col w-56 pt-4 px-4 space-y-6 h-full bg-gray-50 border-r border-gray-300 animate-pulse"> | ||
<div className="w-full bg-gray-200 rounded-md h-12 "></div> | ||
<div className="w-full bg-gray-200 rounded-md h-12"></div> | ||
<div className="w-full bg-gray-200 rounded-md h-12"></div> | ||
<div className="w-full bg-gray-200 rounded-md h-12"></div> | ||
<div className="w-full bg-gray-200 rounded-md h-12 "></div> | ||
<div className="w-full bg-gray-200 rounded-md h-12"></div> | ||
<div className="w-full bg-gray-200 rounded-md h-12"></div> | ||
</div> | ||
<div className="flex flex-col flex-1 h-full"> | ||
<div className="flex flex-row h-auto w-full bg-gray-50 p-3 gap-4 justify-center items-end border-b border-gray-300"> | ||
<div className="w-36 bg-gray-200 h-full rounded-md animate-pulse"></div> | ||
<div className="flex-1"></div> | ||
<div className="h-full flex flex-row gap-2 items-center justify-center"> | ||
<HelpDropdown /> | ||
<UserButton signInUrl={clerkUrls.login} afterSwitchSessionUrl="/" /> | ||
</div> | ||
</div> | ||
<div className="flex flex-col items-center justify-center flex-1 p-4"> | ||
<OrganizationList | ||
hidePersonal | ||
afterSelectOrganizationUrl="/organizations/orgs-switched" | ||
afterCreateOrganizationUrl="/organizations/orgs-switched" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
25 changes: 14 additions & 11 deletions
25
src/components/Authentication/Clerk/ClerkRegistration.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
import { SignUp } from "@clerk/nextjs"; | ||
import { useRouter } from "next/router"; | ||
import { clerkUrls } from "./ClerkAuthSessionChecker"; | ||
import SignUpLayout from "./SignUpLayout"; | ||
|
||
export default function ClerkRegistration() { | ||
const { query } = useRouter(); | ||
|
||
const redirectUrl = query.redirectUrl ? query.return_to : undefined; | ||
|
||
return ( | ||
<SignUpLayout activeStep={1}> | ||
<SignUp | ||
path="/registration" | ||
routing="path" | ||
signInUrl="/login" | ||
signInForceRedirectUrl={`/${clerkUrls.createOrganization}?return_to=${redirectUrl}`} | ||
signInFallbackRedirectUrl={`/`} | ||
/> | ||
</SignUpLayout> | ||
<div className="w-full px-3 text-center flex flex-col"> | ||
<div className="flex flex-col mb-12"> | ||
<div className="flex flex-col items-center"> | ||
<SignUp | ||
path="/registration" | ||
routing="path" | ||
signInUrl="/login" | ||
signInForceRedirectUrl={ | ||
redirectUrl ? `/?return_to=${redirectUrl}` : undefined | ||
} | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters