Skip to content

Commit 1b72899

Browse files
committed
Merge branch 'main' into fix/small-fix
2 parents 82ff215 + 4a5155e commit 1b72899

26 files changed

+222
-70
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{".":"1.10.0"}
1+
{".":"1.12.0"}

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## [1.12.0](https://github.com/iExecBlockchainComputing/explorer-v2/compare/iexec-explorer-v1.11.0...iexec-explorer-v1.12.0) (2025-07-21)
4+
5+
6+
### 🚀 Features
7+
8+
* add BackButton component and integrate into various routes ([#41](https://github.com/iExecBlockchainComputing/explorer-v2/issues/41)) ([676996a](https://github.com/iExecBlockchainComputing/explorer-v2/commit/676996a0334ed27178261b7730acf6edbd4ec9e5))
9+
10+
## [1.11.0](https://github.com/iExecBlockchainComputing/explorer-v2/compare/iexec-explorer-v1.10.0...iexec-explorer-v1.11.0) (2025-07-18)
11+
12+
13+
### 🚀 Features
14+
15+
* Added the ability to enable experimental features via a URL parameter. ([#42](https://github.com/iExecBlockchainComputing/explorer-v2/issues/42)) ([414d4b0](https://github.com/iExecBlockchainComputing/explorer-v2/commit/414d4b0a6f0ae1de85515aa2a84dfca079662ce4))
16+
317
## [1.10.0](https://github.com/iExecBlockchainComputing/explorer-v2/compare/iexec-explorer-v1.9.2...iexec-explorer-v1.10.0) (2025-07-17)
418

519

package-lock.json

Lines changed: 19 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "iexec-explorer",
33
"private": true,
4-
"version": "1.10.0",
4+
"version": "1.12.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -53,6 +53,7 @@
5353
"tailwind-merge": "^3.2.0",
5454
"tailwindcss": "^4.1.3",
5555
"tw-animate-css": "^1.2.5",
56+
"use-local-storage-state": "^19.5.0",
5657
"viem": "^2.28.0",
5758
"wagmi": "^2.15.0",
5859
"zustand": "^5.0.3"

src/components/Footer.tsx

Lines changed: 44 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,7 @@ import iExecLogo from '../assets/iexec-logo.svg';
1313
import { ChainLink } from './ChainLink';
1414
import { Button } from './ui/button';
1515

16-
export function Footer({ className }: { className?: string }) {
17-
const { chainId } = useUserStore();
18-
19-
const navLinks = [
20-
{ href: 'https://www.iex.ec/', label: 'iExec Website' },
21-
{ href: getBlockExplorerUrl(chainId), label: 'Block explorer' },
22-
{ href: 'https://www.iex.ec/contact', label: 'Contact Us' },
23-
];
24-
16+
function SocialLinksItems({ className }: { className?: string }) {
2517
const socialLinks = [
2618
{ href: 'https://twitter.com/iEx_ec', icon: <SiX size={16} /> },
2719
{ href: 'https://discord.gg/pbt9m98wnU', icon: <SiDiscord size={16} /> },
@@ -36,6 +28,36 @@ export function Footer({ className }: { className?: string }) {
3628
},
3729
{ href: 'https://medium.com/iex-ec', icon: <SiMedium size={16} /> },
3830
];
31+
return (
32+
<div className={cn('flex', className)}>
33+
{socialLinks.map(({ href, icon }, idx) => (
34+
<Button key={idx} asChild variant="link" className="text-grey-200 p-2">
35+
<a
36+
href={href}
37+
target="_blank"
38+
rel="noopener noreferrer"
39+
aria-label="Social link"
40+
>
41+
{icon}
42+
</a>
43+
</Button>
44+
))}
45+
</div>
46+
);
47+
}
48+
49+
export function Footer({ className }: { className?: string }) {
50+
const { chainId } = useUserStore();
51+
52+
const navLinks = [
53+
{ href: 'https://www.iex.ec/', label: 'iExec Website' },
54+
{ href: 'https://tools.docs.iex.ec/', label: 'Doc tools' },
55+
{ href: 'https://protocol.docs.iex.ec/', label: 'Doc protocol' },
56+
...(chainId !== undefined
57+
? [{ href: getBlockExplorerUrl(chainId), label: 'Block explorer' }]
58+
: []),
59+
{ href: 'https://www.iex.ec/contact', label: 'Contact Us' },
60+
];
3961

4062
const startYear = 2017;
4163
const currentYear = new Date().getFullYear();
@@ -47,17 +69,17 @@ export function Footer({ className }: { className?: string }) {
4769
return (
4870
<footer
4971
className={cn(
50-
'bg-grey-800 border-muted text-grey-200 relative rounded-3xl border px-6 py-10 sm:px-10 lg:px-20',
72+
'bg-grey-800 border-muted text-grey-200 flex flex-col gap-6 rounded-3xl border px-6 py-10 sm:px-10 lg:px-20',
5173
className
5274
)}
5375
>
54-
<div className="grid place-items-center justify-center gap-10 xl:grid-cols-2 xl:place-items-stretch">
76+
<div className="flex flex-col items-center justify-between gap-10 xl:flex-row">
5577
<ChainLink to="/" className="flex items-center gap-2 font-mono">
5678
<img src={iExecLogo} width="25" height="25" alt="iExec logo" />
5779
<span>iExec Explorer</span>
5880
</ChainLink>
5981

60-
<nav className="flex flex-col items-center gap-2 sm:flex-row sm:gap-4 xl:absolute xl:left-1/2 xl:-translate-x-1/2">
82+
<nav className="flex flex-col items-center gap-2 md:flex-row md:gap-4">
6183
{navLinks.map(({ href, label }, idx) => (
6284
<div key={idx} className="flex items-center gap-2">
6385
<Button
@@ -70,37 +92,22 @@ export function Footer({ className }: { className?: string }) {
7092
</a>
7193
</Button>
7294
{idx < navLinks.length - 1 && (
73-
<span className="bg-grey-200 hidden size-1.5 rounded-full sm:block" />
95+
<span className="bg-grey-200 hidden size-1.5 rounded-full md:block" />
7496
)}
7597
</div>
7698
))}
7799
</nav>
78-
79-
<div className="flex items-center xl:justify-end">
80-
{socialLinks.map(({ href, icon }, idx) => (
81-
<Button
82-
key={idx}
83-
asChild
84-
variant="link"
85-
className="text-grey-200 p-2"
86-
>
87-
<a
88-
href={href}
89-
target="_blank"
90-
rel="noopener noreferrer"
91-
aria-label="Social link"
92-
>
93-
{icon}
94-
</a>
95-
</Button>
96-
))}
97-
</div>
100+
<SocialLinksItems className="xl:hidden" />
98101
</div>
99102

100-
<hr className="border-grey-500 mt-10 mb-4" />
101-
<p className="w-full text-center text-sm">
102-
© All Rights Reserved {displayYear}
103-
</p>
103+
<hr className="border-grey-500" />
104+
105+
<div className="flex justify-between">
106+
<p className="w-full text-center text-sm xl:text-left">
107+
© All Rights Reserved {displayYear}
108+
</p>
109+
<SocialLinksItems className="hidden xl:flex" />
110+
</div>
104111
</footer>
105112
);
106113
}

src/components/UnsupportedChain.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
import { SUPPORTED_CHAINS } from '@/config';
21
import { AlertOctagon } from 'lucide-react';
32
import { useAccount } from 'wagmi';
3+
import { getSupportedChains } from '@/utils/chain.utils';
44
import { Alert, AlertDescription, AlertTitle } from './ui/alert';
55

6-
const SUPPORTED_CHAIN_IDS = SUPPORTED_CHAINS.map((chain) => chain.id);
7-
86
export function UnsupportedChain() {
97
const { isConnected, chainId } = useAccount();
8+
const supportedChainIds = getSupportedChains().map((chain) => chain.id);
109
const isChainSupported =
11-
chainId !== undefined && SUPPORTED_CHAIN_IDS.includes(chainId);
10+
chainId !== undefined && supportedChainIds.includes(chainId);
1211

1312
if (!isConnected || isChainSupported) {
1413
return null;

src/components/navbar/ChainSelector.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
import { SUPPORTED_CHAINS } from '@/config.ts';
1+
import { LOCAL_STORAGE_PREFIX } from '@/config.ts';
2+
import { useSearch } from '@tanstack/react-router';
3+
import { useEffect } from 'react';
4+
import useLocalStorageState from 'use-local-storage-state';
25
import { useChainSwitch } from '@/hooks/useChainSwitch.ts';
36
import useUserStore from '@/stores/useUser.store.ts';
7+
import { getSupportedChains } from '@/utils/chain.utils.ts';
48
import {
59
Select,
610
SelectContent,
@@ -12,6 +16,19 @@ import {
1216
export function ChainSelector({ className }: { className?: string }) {
1317
const { chainId } = useUserStore();
1418
const { requestChainChange } = useChainSwitch();
19+
const search = useSearch({ strict: false });
20+
const [, setExperimental] = useLocalStorageState<boolean>(
21+
`${LOCAL_STORAGE_PREFIX}_experimental`,
22+
{ defaultValue: false }
23+
);
24+
25+
useEffect(() => {
26+
if (search?.feature === 'experimental') {
27+
setExperimental(true);
28+
}
29+
}, [search?.feature, setExperimental]);
30+
31+
const filteredChains = getSupportedChains();
1532

1633
const handleChainChange = async (value: string) => {
1734
requestChainChange(Number(value));
@@ -27,7 +44,7 @@ export function ChainSelector({ className }: { className?: string }) {
2744
<SelectValue placeholder="Select Chain" />
2845
</SelectTrigger>
2946
<SelectContent className={className}>
30-
{SUPPORTED_CHAINS.map((chain) => (
47+
{filteredChains.map((chain) => (
3148
<SelectItem
3249
key={chain.id}
3350
value={chain.id.toString()}

src/components/ui/BackButton.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { useRouter, useCanGoBack } from '@tanstack/react-router';
2+
import { ChevronLeft } from 'lucide-react';
3+
import { Button } from './button';
4+
5+
export function BackButton({ className = '' }: { className?: string }) {
6+
const router = useRouter();
7+
const canGoBack = useCanGoBack();
8+
9+
if (!canGoBack) return null;
10+
11+
return (
12+
<Button
13+
variant="outline"
14+
size="sm"
15+
className={`text-grey-400 border-grey-300 pr-4! uppercase ${className}`}
16+
onClick={() => router.history.back()}
17+
>
18+
<ChevronLeft />
19+
Back
20+
</Button>
21+
);
22+
}

src/components/ui/table.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ function TableBody({
3838
<tbody
3939
data-slot="table-body"
4040
className={cn(
41-
'[&_tr]:border-muted *:bg-grey-900 [&_tr]:hover:*:bg-grey-700/80 [&_tr]:*:duration-150 [&_tr:last-child]:border-0',
42-
zebra && '[&_tr]:odd:*:bg-grey-800 [&_tr]:odd:hover:*:bg-grey-700/80',
41+
'[&_tr]:border-muted *:bg-grey-900 [&_tr]:hover:*:bg-grey-700 [&_tr]:*:duration-150 [&_tr:last-child]:border-0',
42+
zebra && '[&_tr]:odd:*:bg-grey-800 [&_tr]:odd:hover:*:bg-grey-700',
4343
className
4444
)}
4545
{...props}

src/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { bellecour, arbitrumSepolia } from './utils/wagmiNetworks';
55
export const ADDRESS_LENGTH = 42;
66
export const ID_OR_HASH_LENGTH = 66;
77

8+
export const LOCAL_STORAGE_PREFIX = 'Explorer';
9+
810
export const PREVIEW_TABLE_LENGTH = 5;
911
export const DETAIL_TABLE_LENGTH = 8;
1012
export const TABLE_LENGTH = 16;
@@ -40,5 +42,6 @@ export const SUPPORTED_CHAINS = [
4042
'https://thegraph.arbitrum-sepolia-testnet.iex.ec/api/subgraphs/id/2GCj8gzLCihsiEDq8cYvC5nUgK6VfwZ6hm3Wj8A3kcxz',
4143
wagmiNetwork: arbitrumSepolia,
4244
tokenSymbol: 'RLC',
45+
isExperimental: true,
4346
},
4447
];

0 commit comments

Comments
 (0)