chore: updates
This commit is contained in:
@@ -153,6 +153,7 @@ const NavItem = ({ id, setFiles, toggleRemoveConfirm }) => {
|
||||
className={`link ${isActive ? "drop_over" : ""} ${
|
||||
muted ? "muted" : ""
|
||||
}`}
|
||||
activeClassName="link_active"
|
||||
to={`/chat/channel/${id}`}
|
||||
>
|
||||
<div className={`name`} title={name}>
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function MagicLinkLogin() {
|
||||
// signIn();
|
||||
};
|
||||
return (
|
||||
<StyledMagicButton onClick={handleGoogleLogin} href="#">
|
||||
<StyledMagicButton onClick={handleGoogleLogin}>
|
||||
Sign in with Magic Link
|
||||
</StyledMagicButton>
|
||||
);
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
/* eslint-disable no-undef */
|
||||
import { useEffect } from 'react';
|
||||
import { useGetOpenidMutation } from '../../app/services/auth';
|
||||
import solidSvg from '../../assets/icons/solid.svg?url';
|
||||
import { StyledSocialButton } from './styled';
|
||||
import { useEffect } from "react";
|
||||
import { useGetOpenidMutation } from "../../app/services/auth";
|
||||
import solidSvg from "../../assets/icons/solid.svg?url";
|
||||
import { StyledSocialButton } from "./styled";
|
||||
|
||||
export default function SolidLoginButton({ issuers }) {
|
||||
const [getOpenId, { data, isLoading, isSuccess }] = useGetOpenidMutation();
|
||||
const [getOpenId, { data, isLoading, isSuccess }] = useGetOpenidMutation();
|
||||
|
||||
const handleSolidLogin = () => {
|
||||
getOpenId({
|
||||
// issuer: "solidweb.org",
|
||||
issuer: issuers[0],
|
||||
redirect_uri: `${location.origin}/#/login`
|
||||
});
|
||||
};
|
||||
useEffect(() => {
|
||||
if (isSuccess) {
|
||||
console.log('wtf', data);
|
||||
const { url } = data;
|
||||
location.href = url;
|
||||
}
|
||||
}, [data, isSuccess]);
|
||||
const handleSolidLogin = () => {
|
||||
getOpenId({
|
||||
// issuer: "solidweb.org",
|
||||
issuer: issuers[0],
|
||||
redirect_uri: `${location.origin}/#/login`,
|
||||
});
|
||||
};
|
||||
useEffect(() => {
|
||||
if (isSuccess) {
|
||||
console.log("wtf", data);
|
||||
const { url } = data;
|
||||
location.href = url;
|
||||
}
|
||||
}, [data, isSuccess]);
|
||||
|
||||
return (
|
||||
<StyledSocialButton disabled={isLoading} onClick={handleSolidLogin} href="#">
|
||||
<img src={solidSvg} className="icon" alt="solid icon" />
|
||||
{isLoading ? `Redirecting...` : `Sign in with Solid`}
|
||||
</StyledSocialButton>
|
||||
);
|
||||
return (
|
||||
<StyledSocialButton disabled={isLoading} onClick={handleSolidLogin}>
|
||||
<img src={solidSvg} className="icon" alt="solid icon" />
|
||||
{isLoading ? `Redirecting...` : `Sign in with Solid`}
|
||||
</StyledSocialButton>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user