Skip to content

Commit

Permalink
feat(client): replace redirect to use api sdk
Browse files Browse the repository at this point in the history
waddaboo committed Dec 3, 2024
1 parent 17602b7 commit 1e90130
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions apps/client/src/pages/home.tsx
Original file line number Diff line number Diff line change
@@ -20,6 +20,8 @@ import { useSearchParams } from "react-router-dom"
import icon1Image from "../assets/icon1.svg"
import {
addMemberByInviteCode,
DashboardUrl,
getCredentialGroupJoinUrl,
getGroup,
getInvite,
isGroupMember
@@ -129,12 +131,19 @@ export default function HomePage(): JSX.Element {
const identity = new Identity(await signer.signMessage(message))
const identityCommitment = identity.getCommitment().toString()

window.open(
`${
import.meta.env.VITE_DASHBOARD_URL
}/credentials?group=${groupId}&member=${identityCommitment}&provider=${providerName}`
const dashboardUrl = import.meta.env
.VITE_DASHBOARD_URL as DashboardUrl
const credentialGroupJoinUrl = getCredentialGroupJoinUrl(
dashboardUrl,
groupId,
identityCommitment,
providerName
)

if (credentialGroupJoinUrl) {
window.open(credentialGroupJoinUrl, "_blank")
}

setLoading(false)
}
},

0 comments on commit 1e90130

Please sign in to comment.