Skip to content

Commit

Permalink
show connect when user is not logged in (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
Megha-Dev-19 authored Feb 8, 2024
1 parent d3823c7 commit eb9191d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions apps/builddao/widget/components/buttons/Connect.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { joinBtnChildren, connectedChildren, showActivity, className, href } =
props;

const { Bullet } = VM.require("buildhub.near/widget/components.Bullet") || {
const { Bullet } = VM.require("buildhub.near/widget/components") || {
Bullet: () => <></>
};
const DaoSDK = VM.require("sdks.near/widget/SDKs.Sputnik.DaoSDK") || (() => {});
Expand Down Expand Up @@ -124,15 +124,23 @@ const { href: linkHref } = VM.require("buildhub.near/widget/lib.url") || {
};

const Component = () => {
if (data.isDaoMember || isConnected) {
if (!context.accountId) {
return (
<a
href={"https://nearbuilders.org/join"}
style={{ textDecoration: "none" }}
>
Sign In to Connect
</a>
);
} else if (data.isDaoMember || isConnected) {
if (showActivity) {
return (
<div className="d-flex flex-column align-items-center gap-3">
<Bullet variant="light">
{data.isDaoMember ? "Joined" : "Pending application"}
</Bullet>
<Link
// href={"/?page=feed"}
to={linkHref({
widgetSrc: "buildhub.near/widget/app",
params: {
Expand Down

0 comments on commit eb9191d

Please sign in to comment.