Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions layouts/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ const Layout = ({ children, title = "Livepeer Explorer" }) => {
}
}, []);

const isMyAccountPage = useMemo(() => {
if (!accountAddress) return false;
return asPath.toLowerCase().includes(accountAddress.toLowerCase());
}, [accountAddress, asPath]);

return (
<DesignSystemProviderTyped>
<ThemeProvider
Expand Down Expand Up @@ -462,8 +467,7 @@ const Layout = ({ children, title = "Livepeer Explorer" }) => {
css={{
marginLeft: "$2",
backgroundColor:
(!accountAddress ||
!asPath.includes(accountAddress)) &&
(!accountAddress || !isMyAccountPage) &&
(asPath.includes("/accounts") ||
asPath.includes("/orchestrators"))
? "hsla(0,100%,100%,.05)"
Expand Down Expand Up @@ -552,14 +556,15 @@ const Layout = ({ children, title = "Livepeer Explorer" }) => {
</Button>
</Link>
{accountAddress && (
<Link passHref href={`/accounts/${accountAddress}`}>
<Link
passHref
href={`/accounts/${accountAddress.toLowerCase()}`}
>
<Button
size="3"
css={{
marginLeft: "$2",
backgroundColor: asPath.includes(
accountAddress
)
backgroundColor: isMyAccountPage
? "hsla(0,100%,100%,.05)"
: "transparent",
color: "white",
Expand Down