Skip to content

Commit

Permalink
Hide network routes card for non-linux peers (netbirdio#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
braginini authored Sep 20, 2023
1 parent 2e81765 commit 3797db9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/PeerUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ const PeerUpdate = (props: any) => {

useEffect(() => {}, [users]);

const routeAddAllowed = (os: string): boolean => {
return os !== ""
&& !os.toLowerCase().startsWith("darwin")
&& !os.toLowerCase().startsWith("windows")
&& !os.toLowerCase().startsWith("android")
}

const toggleEditName = (status: boolean, value?: string) => {
setEditName(status);

Expand Down Expand Up @@ -965,6 +972,7 @@ const PeerUpdate = (props: any) => {
{/* --- */}
{!isGroupUpdateView && (
<>
{routeAddAllowed(peer.os) &&
<Card
bordered={true}
// loading={loading}ƒ
Expand Down Expand Up @@ -1090,7 +1098,7 @@ const PeerUpdate = (props: any) => {
</Space>
)}
</div>
</Card>
</Card>}

<Card bordered={true} style={{ marginBottom: "50px" }}>
<Col span={24}>
Expand Down

0 comments on commit 3797db9

Please sign in to comment.