-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(clerk-react): Support for fallback prop (#4723)
Co-authored-by: Alex Carpenter <[email protected]>
- Loading branch information
1 parent
8ad1866
commit b5eb15b
Showing
32 changed files
with
768 additions
and
246 deletions.
There are no files selected for viewing
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,10 @@ | ||
--- | ||
'@clerk/clerk-react': minor | ||
--- | ||
|
||
Adds support for a `fallback` prop on Clerk's components. This allows rendering of a placeholder element while Clerk's components are mounting. Use this to help mitigate layout shift when using Clerk's components. Example usage: | ||
|
||
|
||
```tsx | ||
<SignIn fallback={<LoadingSkeleton />} /> | ||
``` |
9 changes: 9 additions & 0 deletions
9
integration/templates/next-app-router/src/app/create-organization/page.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { CreateOrganization } from '@clerk/nextjs'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<CreateOrganization fallback={<>Loading create organization</>} /> | ||
</div> | ||
); | ||
} |
9 changes: 9 additions & 0 deletions
9
integration/templates/next-app-router/src/app/organization-list/page.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { OrganizationList } from '@clerk/nextjs'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<OrganizationList fallback={<>Loading organization list</>} /> | ||
</div> | ||
); | ||
} |
12 changes: 12 additions & 0 deletions
12
integration/templates/next-app-router/src/app/organization-profile/page.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { OrganizationProfile } from '@clerk/nextjs'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<OrganizationProfile | ||
routing='hash' | ||
fallback={<>Loading organization profile</>} | ||
/> | ||
</div> | ||
); | ||
} |
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
7 changes: 6 additions & 1 deletion
7
integration/templates/next-app-router/src/app/switcher/page.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,5 +1,10 @@ | ||
import { OrganizationSwitcher } from '@clerk/nextjs'; | ||
|
||
export default function Page() { | ||
return <OrganizationSwitcher hidePersonal={true} />; | ||
return ( | ||
<OrganizationSwitcher | ||
hidePersonal={true} | ||
fallback={<>Loading organization switcher</>} | ||
/> | ||
); | ||
} |
9 changes: 9 additions & 0 deletions
9
integration/templates/next-app-router/src/app/user-button/page.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { UserButton } from '@clerk/nextjs'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<UserButton fallback={<>Loading user button</>} /> | ||
</div> | ||
); | ||
} |
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
9 changes: 9 additions & 0 deletions
9
integration/templates/next-app-router/src/app/waitlist/page.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Waitlist } from '@clerk/nextjs'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<Waitlist fallback={<>Loading waitlist</>} /> | ||
</div> | ||
); | ||
} |
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
9 changes: 9 additions & 0 deletions
9
integration/templates/react-vite/src/create-organization/index.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { CreateOrganization } from '@clerk/clerk-react'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<CreateOrganization fallback={<>Loading create organization</>} /> | ||
</div> | ||
); | ||
} |
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
9 changes: 9 additions & 0 deletions
9
integration/templates/react-vite/src/organization-list/index.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { OrganizationList } from '@clerk/clerk-react'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<OrganizationList fallback={<>Loading organization list</>} /> | ||
</div> | ||
); | ||
} |
12 changes: 12 additions & 0 deletions
12
integration/templates/react-vite/src/organization-profile/index.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { OrganizationProfile } from '@clerk/clerk-react'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<OrganizationProfile | ||
routing='hash' | ||
fallback={<>Loading organization profile</>} | ||
/> | ||
</div> | ||
); | ||
} |
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,9 @@ | ||
import { UserButton } from '@clerk/clerk-react'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<UserButton fallback={<>Loading user button</>} /> | ||
</div> | ||
); | ||
} |
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,9 @@ | ||
import { Waitlist } from '@clerk/clerk-react'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<Waitlist fallback={<>Loading waitlist</>} /> | ||
</div> | ||
); | ||
} |
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
Oops, something went wrong.