Skip to content

Commit

Permalink
fix(web): hide-labels-if-disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
Harman-singh-waraich committed Jan 29, 2024
1 parent 7cb7d86 commit c36f002
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/src/components/DisputeCard/DisputeInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { getCourtsPath } from "pages/Courts/CourtDetails";
import { useCourtTree } from "hooks/queries/useCourtTree";
import { responsiveSize } from "styles/responsiveSize";
import CardLabel from "./CardLabels";
import { useAccount } from "wagmi";

const Container = styled.div<{ isList: boolean; isOverview?: boolean }>`
display: flex;
Expand Down Expand Up @@ -129,6 +130,7 @@ const DisputeInfo: React.FC<IDisputeInfo> = ({
showLabels = false,
}) => {
const { isList } = useIsList();
const { isDisconnected } = useAccount();
const displayAsList = isList && !overrideIsList;
const { data } = useCourtTree();
const courtPath = getCourtsPath(data?.court, courtId);
Expand Down Expand Up @@ -211,7 +213,7 @@ const DisputeInfo: React.FC<IDisputeInfo> = ({
isOverview={isOverview}
/>
)}
{showLabels && <CardLabel disputeId={disputeID!} round={round! - 1} />}
{showLabels && !isDisconnected ? <CardLabel disputeId={disputeID!} round={round! - 1} /> : null}
</RestOfFieldsContainer>
</Container>
);
Expand Down

0 comments on commit c36f002

Please sign in to comment.