Skip to content

Commit

Permalink
Merge pull request #192 from AI4Bharat/Rahul-540
Browse files Browse the repository at this point in the history
minor change in guest authentication
  • Loading branch information
ishvindersethi22 authored Dec 31, 2024
2 parents 1a7de03 + a605795 commit 3a822b6
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/components/GuestWorkspace/GuestWorkspaceTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ const GuestWorkspaceTable = (props) => {
const data =
guestWorkspaceData && guestWorkspaceData.length > 0
? pageSearch().map((el, i) => {
const isAuthenticated =
el.is_autheticated || authenticatedWorkspaces.includes(el.id);
return [
el.id,
el.workspace_name,
Expand All @@ -271,13 +273,15 @@ const GuestWorkspaceTable = (props) => {
<CustomButton
key={i}
sx={{ borderRadius: 2 }}
label={
authenticatedWorkspaces.includes(el.id)
? "View"
: "Authenticate"
}
label={isAuthenticated ? "View" : "Authenticate"}
// label={
// authenticatedWorkspaces.includes(el.id)
// ? "View"
// : "Authenticate"
// }
onClick={
authenticatedWorkspaces.includes(el.id)
// authenticatedWorkspaces.includes(el.id)
isAuthenticated
? () => handleViewWorkspace(el.id)
: () => handleOpen(el.workspace_name, el.id)
}
Expand Down Expand Up @@ -395,4 +399,4 @@ const GuestWorkspaceTable = (props) => {
);
};

export default GuestWorkspaceTable;
export default GuestWorkspaceTable;

0 comments on commit 3a822b6

Please sign in to comment.