Skip to content

Commit

Permalink
fixed: network display issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sajjadmrx committed Sep 26, 2023
1 parent e2488f8 commit 06f1ab4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
8 changes: 1 addition & 7 deletions src/renderer/component/cards/server-info/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,7 @@ export function ServerInfoCardComponent(prop: Prop) {
variant="ghost"
color={isConnect ? "green" : "red"}
size="sm"
value={
network == "Auto"
? isConnect
? "Connected"
: "Disconnect"
: network
}
value={network}
className={`font-[0px] ${
isConnect ? "text-[#42A752]" : "text-[#B43D3D]"
}`}
Expand Down
12 changes: 8 additions & 4 deletions src/renderer/pages/home.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ export function HomePage() {

useEffect(() => {
async function getCurrentActive() {
if (!network) {
setNetwork(window.storePreload.get("settings").network_interface);
return;
}
try {
setSelectedServer(null);
const response = await window.ipc.getCurrentActive();
setCurrentActive(response.server);
setSelectedServer(response.server);
if (!network)
setNetwork(window.storePreload.get("settings").network_interface);
} finally {
setLoadingCurrentActive(false);
}
Expand Down Expand Up @@ -88,8 +90,10 @@ export function HomePage() {
"absolute top-[330px] left-[360px] flex flex-col gap-2 h-10"
}
>
<DeleteButtonComponent />
{/*<EditButtonComponent />*/}
<div className={"flx flex-row gap-10"}>
<DeleteButtonComponent />
{/*<EditButtonComponent />*/}
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 06f1ab4

Please sign in to comment.