File tree Expand file tree Collapse file tree 8 files changed +40
-25
lines changed Expand file tree Collapse file tree 8 files changed +40
-25
lines changed Original file line number Diff line number Diff line change 1
1
import { Panel } from "@namada/components" ;
2
2
import { ConnectPanel } from "App/Common/ConnectPanel" ;
3
3
import { PageWithSidebar } from "App/Common/PageWithSidebar" ;
4
- import { ShieldedSyncProgress } from "App/Masp/ShieldedSyncProgress" ;
5
- import { EpochInformation } from "App/Sidebars/EpochInformation" ;
4
+ import { Sidebar } from "App/Layout/Sidebar" ;
6
5
import MainnetRoadmap from "App/Sidebars/MainnetRoadmap" ;
7
6
import { ShieldAllBanner } from "App/Sidebars/ShieldAllBanner" ;
8
7
import { StakingRewardsPanel } from "App/Staking/StakingRewardsPanel" ;
@@ -54,12 +53,10 @@ export const AccountOverview = (): JSX.Element => {
54
53
</ Panel >
55
54
</ section >
56
55
</ div >
57
- < aside className = "flex flex-col gap-2" >
58
- < EpochInformation />
59
- < ShieldedSyncProgress />
56
+ < Sidebar >
60
57
< ShieldAllBanner />
61
58
< MainnetRoadmap />
62
- </ aside >
59
+ </ Sidebar >
63
60
</ PageWithSidebar >
64
61
) ;
65
62
} ;
Original file line number Diff line number Diff line change 1
1
import { Panel , SkeletonLoading } from "@namada/components" ;
2
2
import { ConnectBanner } from "App/Common/ConnectBanner" ;
3
3
import { PageWithSidebar } from "App/Common/PageWithSidebar" ;
4
- import { EpochInformation } from "App/Sidebars/EpochInformation " ;
4
+ import { Sidebar } from "App/Layout/Sidebar " ;
5
5
import { allProposalsAtom , votedProposalsAtom } from "atoms/proposals" ;
6
6
import {
7
7
atomsAreFetching ,
@@ -76,8 +76,7 @@ export const GovernanceOverview: React.FC = () => {
76
76
/>
77
77
</ ProposalListPanel >
78
78
</ div >
79
- < aside className = "flex flex-col gap-2 mt-1.5 lg:mt-0" >
80
- < EpochInformation />
79
+ < Sidebar >
81
80
< Panel >
82
81
{ atomsAreFetching ( allProposals ) && (
83
82
< SkeletonLoading height = "150px" width = "100%" />
@@ -86,7 +85,7 @@ export const GovernanceOverview: React.FC = () => {
86
85
< ProposalsSummary allProposals = { allProposals . data ! } />
87
86
) }
88
87
</ Panel >
89
- </ aside >
88
+ </ Sidebar >
90
89
</ PageWithSidebar >
91
90
) ;
92
91
} ;
Original file line number Diff line number Diff line change 1
1
import { Panel , TabContainer } from "@namada/components" ;
2
2
import { ConnectPanel } from "App/Common/ConnectPanel" ;
3
3
import { PageWithSidebar } from "App/Common/PageWithSidebar" ;
4
+ import { Sidebar } from "App/Layout/Sidebar" ;
4
5
import { routes } from "App/routes" ;
5
- import { EpochInformation } from "App/Sidebars/EpochInformation" ;
6
6
import { ShieldAllBanner } from "App/Sidebars/ShieldAllBanner" ;
7
7
import { useUserHasAccount } from "hooks/useIsAuthenticated" ;
8
8
import { Outlet , useLocation , useNavigate } from "react-router-dom" ;
@@ -44,10 +44,9 @@ export const IbcTransfersLayout = (): JSX.Element => {
44
44
] }
45
45
/>
46
46
</ div >
47
- < aside className = "w-full mt-2 flex flex-col sm:flex-row lg:mt-0 lg:flex-col gap-2" >
48
- < EpochInformation />
47
+ < Sidebar >
49
48
< ShieldAllBanner />
50
- </ aside >
49
+ </ Sidebar >
51
50
</ PageWithSidebar >
52
51
) ;
53
52
} ;
Original file line number Diff line number Diff line change
1
+ import { ShieldedSyncProgress } from "App/Masp/ShieldedSyncProgress" ;
2
+ import { EpochInformation } from "App/Sidebars/EpochInformation" ;
3
+ import { ReactNode } from "react" ;
4
+
5
+ export const Sidebar = ( { children } : { children : ReactNode } ) : JSX . Element => {
6
+ return (
7
+ < aside className = "flex flex-col gap-2 mt-1.5 lg:mt-0" >
8
+ < EpochInformation />
9
+ < ShieldedSyncProgress />
10
+ { children }
11
+ </ aside >
12
+ ) ;
13
+ } ;
Original file line number Diff line number Diff line change 1
1
import { ConnectPanel } from "App/Common/ConnectPanel" ;
2
2
import { MaspContainer } from "App/Common/MaspContainer" ;
3
3
import { PageWithSidebar } from "App/Common/PageWithSidebar" ;
4
+ import { Sidebar } from "App/Layout/Sidebar" ;
4
5
import { routes } from "App/routes" ;
5
6
import { ShieldAllBanner } from "App/Sidebars/ShieldAllBanner" ;
6
7
import { shieldedBalanceAtom } from "atoms/balance" ;
7
8
import { useUserHasAccount } from "hooks/useIsAuthenticated" ;
8
9
import { useAtomValue } from "jotai" ;
9
10
import { useEffect } from "react" ;
10
11
import { Outlet , useLocation } from "react-router-dom" ;
11
- import { ShieldedSyncProgress } from "./ShieldedSyncProgress" ;
12
12
13
13
export const MaspLayout : React . FC = ( ) => {
14
14
const userHasAccount = useUserHasAccount ( ) ;
@@ -29,10 +29,9 @@ export const MaspLayout: React.FC = () => {
29
29
< MaspContainer >
30
30
< Outlet />
31
31
</ MaspContainer >
32
- < aside className = "w-full mt-2 flex flex-col sm:flex-row lg:mt-0 lg:flex-col gap-2" >
33
- < ShieldedSyncProgress />
32
+ < Sidebar >
34
33
< ShieldAllBanner />
35
- </ aside >
34
+ </ Sidebar >
36
35
</ PageWithSidebar >
37
36
) ;
38
37
} ;
Original file line number Diff line number Diff line change 1
1
import { shieldedBalanceAtom , shieldedSyncProgress } from "atoms/balance/atoms" ;
2
2
import { useAtomValue } from "jotai" ;
3
+ import { twMerge } from "tailwind-merge" ;
3
4
4
5
export const ShieldedSyncProgress = ( ) : JSX . Element => {
5
6
const syncProgress = useAtomValue ( shieldedSyncProgress ) ;
@@ -10,11 +11,18 @@ export const ShieldedSyncProgress = (): JSX.Element => {
10
11
}
11
12
12
13
return (
13
- < div className = { " bg-yellow rounded-sm text-xs font-medium py-2 px-3"} >
14
+ < div className = "relative bg-black text- yellow rounded-sm overflow-hidden text-xs font-medium py-2 px-3">
14
15
Shielded sync{ " " }
15
16
{ syncProgress === 1 ?
16
17
"converting..."
17
18
: `progress: ${ Math . min ( Math . floor ( syncProgress * 100 ) , 100 ) } %` }
19
+ < div
20
+ className = { twMerge (
21
+ "absolute bg-yellow top-0 left-0 w-full h-full mix-blend-difference origin-left" ,
22
+ syncProgress > 0 && "transition-all"
23
+ ) }
24
+ style = { { transform : `scaleX(${ syncProgress * 100 } %)` } }
25
+ />
18
26
</ div >
19
27
) ;
20
28
} ;
Original file line number Diff line number Diff line change 1
1
import { Panel } from "@namada/components" ;
2
2
import { ConnectBanner } from "App/Common/ConnectBanner" ;
3
3
import { PageWithSidebar } from "App/Common/PageWithSidebar" ;
4
- import { EpochInformation } from "App/Sidebars/EpochInformation " ;
4
+ import { Sidebar } from "App/Layout/Sidebar " ;
5
5
import { ValidatorDiversification } from "App/Sidebars/ValidatorDiversification" ;
6
6
import { YourStakingDistribution } from "App/Sidebars/YourStakingDistribution" ;
7
7
import { myValidatorsAtom } from "atoms/validators" ;
@@ -40,8 +40,7 @@ export const StakingOverview = (): JSX.Element => {
40
40
< AllValidatorsTable />
41
41
</ Panel >
42
42
</ div >
43
- < aside className = "w-full mt-2 flex flex-col sm:flex-row lg:mt-0 lg:flex-col gap-2" >
44
- < EpochInformation />
43
+ < Sidebar >
45
44
{ hasStaking && myValidators . isSuccess && (
46
45
< Panel className = "w-full @container" >
47
46
< YourStakingDistribution myValidators = { myValidators . data ! } />
@@ -50,7 +49,7 @@ export const StakingOverview = (): JSX.Element => {
50
49
< Panel >
51
50
< ValidatorDiversification />
52
51
</ Panel >
53
- </ aside >
52
+ </ Sidebar >
54
53
</ PageWithSidebar >
55
54
) ;
56
55
} ;
Original file line number Diff line number Diff line change 1
1
import { ConnectPanel } from "App/Common/ConnectPanel" ;
2
2
import { PageWithSidebar } from "App/Common/PageWithSidebar" ;
3
+ import { Sidebar } from "App/Layout/Sidebar" ;
3
4
import { ShieldAllBanner } from "App/Sidebars/ShieldAllBanner" ;
4
5
import { useUserHasAccount } from "hooks/useIsAuthenticated" ;
5
6
import { Outlet } from "react-router-dom" ;
@@ -14,9 +15,9 @@ export const TransferLayout: React.FC = () => {
14
15
return (
15
16
< PageWithSidebar >
16
17
< Outlet />
17
- < aside className = "w-full mt-2 flex flex-col sm:flex-row lg:mt-0 lg:flex-col gap-2" >
18
+ < Sidebar >
18
19
< ShieldAllBanner />
19
- </ aside >
20
+ </ Sidebar >
20
21
</ PageWithSidebar >
21
22
) ;
22
23
} ;
You can’t perform that action at this time.
0 commit comments