Skip to content

Commit

Permalink
chore: Drop url constants from Astro components
Browse files Browse the repository at this point in the history
Those values may be incorrect in the CF worker runtime, but also not needed because the correct values are passed from the middleware down to the client and clerk is initialized with the correct values from server.
  • Loading branch information
panteliselef committed Jun 21, 2024
1 parent 49d0ae1 commit f78fd2d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/tough-planes-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro-clerk-auth": patch
---

Drop url constants from Astro components.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
import type { SignInProps } from "@clerk/types";
type Props = SignInProps;
import { signUpUrl } from "astro-clerk-auth/v0";
import { customAlphabet, urlAlphabet } from "nanoid";
const safeId = customAlphabet(urlAlphabet, 10)();
const props = {
...Astro.props,
signUpUrl: Astro.props.signUpUrl || signUpUrl
...Astro.props
}
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
import type { SignUpProps } from "@clerk/types";
type Props = SignUpProps;
import { signInUrl } from "astro-clerk-auth/v0";
import { customAlphabet, urlAlphabet } from "nanoid";
const safeId = customAlphabet(urlAlphabet, 10)();
const props = {
...Astro.props,
signInUrl: Astro.props.signInUrl || signInUrl
...Astro.props
}
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
import type { SignInProps } from "@clerk/types";
type Props = SignInProps
import { signUpUrl } from "astro-clerk-auth/v0";
import { SignIn as SignInReact } from "astro-clerk-auth/client/react";
const props = {
...Astro.props,
signUpUrl: Astro.props.signUpUrl || signUpUrl
...Astro.props
}
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
import type { SignUpProps } from "@clerk/types";
type Props = SignUpProps
import { signInUrl } from "astro-clerk-auth/v0";
import { SignUp as SignUpReact } from "astro-clerk-auth/client/react";
const props = {
...Astro.props,
signInUrl: Astro.props.signInUrl || signInUrl
...Astro.props
}
---

Expand Down

0 comments on commit f78fd2d

Please sign in to comment.