@oxyhq/services
Advanced tools
Comparing version 0.0.27 to 0.0.28
import React from "react"; | ||
import styles from "./styles/sign-in-button.module.css"; | ||
import { OxyLogo } from "../assets/oxy-logo"; | ||
export const SignInButton = ({ icon = React.createElement(OxyLogo, null), text = "Sign in with Oxy", callback = window.location.href, }) => { | ||
export const SignInButton = ({ icon = React.createElement(OxyLogo, null), text = "Sign in with Oxy", callback = typeof window !== "undefined" ? window.location.href : "", }) => { | ||
const onClick = () => { | ||
const redirectUrl = `https://auth.oxy.so/?callback=${encodeURIComponent(callback)}`; | ||
window.location.href = redirectUrl; | ||
if (typeof window !== "undefined") { | ||
const redirectUrl = `https://auth.oxy.so/?callback=${encodeURIComponent(callback)}`; | ||
window.location.href = redirectUrl; | ||
} | ||
}; | ||
@@ -9,0 +11,0 @@ return (React.createElement("button", { onClick: onClick, className: styles.container }, |
{ | ||
"name": "@oxyhq/services", | ||
"version": "0.0.27", | ||
"version": "0.0.28", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "homepage": "https://oxy.so/", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76537
1218