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
5 changes: 5 additions & 0 deletions .changeset/quiet-ways-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/astro": patch
---

Drop convenience Astro wrappers for React components
6 changes: 3 additions & 3 deletions integration/templates/astro-node/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Layout from "../layouts/Layout.astro";
import Card from "../components/Card.astro";
import SignOutButton from "../lib/astro-components/SignOutButton.astro";

import { SignedIn, SignedOut } from "@clerk/astro/components/react";
import { SignedIn, SignedOut } from "@clerk/astro/client/react";
import { OrganizationSwitcher } from "@clerk/astro/components/interactive";
---

Expand All @@ -30,7 +30,7 @@ import { OrganizationSwitcher } from "@clerk/astro/components/interactive";
<strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
</p>
<ul role="list" class="link-card-grid">
<SignedOut>
<SignedOut client:load>
<Card
href="/sign-in"
title="Log in"
Expand All @@ -42,7 +42,7 @@ import { OrganizationSwitcher } from "@clerk/astro/components/interactive";
body="Supercharge your project with new frameworks and libraries."
/>
</SignedOut>
<SignedIn>
<SignedIn client:load>
<Card
href="/user"
title="User Profile"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
import { Protect } from "@clerk/astro/components/react";
import { Protect } from "@clerk/astro/client/react";
import Layout from "../layouts/Layout.astro";
---

<Layout title="Page is only accessible by members">
<div class="w-full flex justify-center flex-col">
<Protect role="admin">
<Protect client:load role="admin">
<Fragment slot="fallback">
<h1 class="text-2xl text-center">Not an admin</h1>
<a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
import { Protect } from "@clerk/astro/components/react";
import { Protect } from "@clerk/astro/client/react";
import Layout from "../layouts/Layout.astro";
---

<Layout title="Page is only accessible by members">
<div class="w-full flex justify-center flex-col">
<Protect role="basic_member">
<Protect client:load role="basic_member">
<Fragment slot="fallback">
<h1 class="text-2xl text-center">Not a member</h1>
<a
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ All of the above can be used with React or Vanilla JS. The only difference is th

```ts
// Import UserProfile build with React (requires `@astro/react`)
import { UserProfile } from '@clerk/astro/components/react';
import { UserProfile } from '@clerk/astro/client/react';

// Import UserButton build with vanilla JS
import { UserProfile } from '@clerk/astro/components/interactive';
Expand All @@ -216,7 +216,7 @@ All of the above can be used with React or only on server. The only difference i

```ts
// Import Protect build with React (requires `@astro/react`)
import { Protect } from '@clerk/astro/components/react';
import { Protect } from '@clerk/astro/client/react';

// Import SignedIn build server side code
import { SignedIn } from '@clerk/astro/components/control';
Expand Down
2 changes: 0 additions & 2 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@
"./env": "./env.d.ts",
"./components/control": "./components/control/index.ts",
"./components/control/*": "./components/control/*",
"./components/react": "./components/react/index.ts",
"./components/react/*": "./components/react/*",
"./components/interactive": "./components/interactive/index.ts",
"./components/interactive/*": "./components/interactive/*",
"./components/unstyled": "./components/unstyled/index.ts",
Expand Down
16 changes: 0 additions & 16 deletions packages/astro/src/astro-components/react/OrganizationList.astro

This file was deleted.

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions packages/astro/src/astro-components/react/Protect.astro

This file was deleted.

15 changes: 0 additions & 15 deletions packages/astro/src/astro-components/react/SignIn.astro

This file was deleted.

15 changes: 0 additions & 15 deletions packages/astro/src/astro-components/react/SignUp.astro

This file was deleted.

7 changes: 0 additions & 7 deletions packages/astro/src/astro-components/react/SignedIn.astro

This file was deleted.

7 changes: 0 additions & 7 deletions packages/astro/src/astro-components/react/SignedOut.astro

This file was deleted.

15 changes: 0 additions & 15 deletions packages/astro/src/astro-components/react/UserButton.astro

This file was deleted.

16 changes: 0 additions & 16 deletions packages/astro/src/astro-components/react/UserProfile.astro

This file was deleted.

22 changes: 0 additions & 22 deletions packages/astro/src/astro-components/react/index.ts

This file was deleted.