Skip to content

Commit

Permalink
add checks to hide last login for non netbird hosted deployments (net…
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer authored Sep 27, 2023
1 parent 8e8484c commit fd24536
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/views/RegularUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ export const RegularUsers = () => {
{btn}
<Tag color="blue">me</Tag>
</div>
{((record as User).last_login && <Text type={"secondary"} style={{paddingLeft: "15px"}}>Last login: {String(timeAgo((record as User).last_login))}</Text>)}
{(isNetBirdHosted() || isLocalDev()) && ((record as User).last_login && <Text type={"secondary"} style={{paddingLeft: "15px"}}>Last login: {String(timeAgo((record as User).last_login))}</Text>)}
</>
);
}
Expand All @@ -600,7 +600,7 @@ export const RegularUsers = () => {
{btn}
<Tag color="gold">invited</Tag>
</div>
{((record as User).last_login && <Text type={"secondary"} style={{paddingLeft: "15px", paddingTop: "0px"}}>Last login: {String(timeAgo((record as User).last_login))}</Text>)}
{(isNetBirdHosted() || isLocalDev()) && ((record as User).last_login && <Text type={"secondary"} style={{paddingLeft: "15px", paddingTop: "0px"}}>Last login: {String(timeAgo((record as User).last_login))}</Text>)}
</>
);
}
Expand All @@ -612,7 +612,7 @@ export const RegularUsers = () => {
{btn}
<Tag color="red">blocked</Tag>
</div>
{((record as User).last_login && <Text type={"secondary"} style={{paddingLeft: "15px"}}>Last login: {String(timeAgo((record as User).last_login))}</Text>)}
{(isNetBirdHosted() || isLocalDev()) && ((record as User).last_login && <Text type={"secondary"} style={{paddingLeft: "15px"}}>Last login: {String(timeAgo((record as User).last_login))}</Text>)}
</>
);
}
Expand All @@ -622,7 +622,7 @@ export const RegularUsers = () => {
<div>
{btn}
</div>
{((record as User).last_login && <Text type={"secondary"} style={{paddingLeft: "15px", paddingTop: "0px"}}>Last login: {String(timeAgo((record as User).last_login))}</Text>)}
{(isNetBirdHosted() || isLocalDev()) && ((record as User).last_login && <Text type={"secondary"} style={{paddingLeft: "15px", paddingTop: "0px"}}>Last login: {String(timeAgo((record as User).last_login))}</Text>)}
</>
);
}}
Expand Down

0 comments on commit fd24536

Please sign in to comment.