Skip to content

Commit 6d9e9f4

Browse files
committed
Merge branch 'main' of https://github.com/LumeraProtocol/lumera-hub into feat/create-proposal
# Conflicts: # packages/ui/src/screens/GovernanceDetailsScreen.tsx # packages/ui/src/screens/StakingScreen.tsx
2 parents f6e99f1 + 073c074 commit 6d9e9f4

File tree

17 files changed

+51
-57
lines changed

17 files changed

+51
-57
lines changed

apps/web/src/app/block/[height]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function Page() {
1212
const dispatch = useDispatch();
1313

1414
useEffect(() => {
15-
document.title = 'Block ';
15+
document.title = 'Block';
1616
dispatch(setCurrentPath({
1717
currentPath: '/block',
1818
}));

apps/web/src/app/governance/page.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,22 @@ import useGovernances from '@/hooks/useGovernances';
88
import useProposals, { IProposal } from '@/hooks/useProposals';
99
import useWalletConnect from '@/hooks/useWalletConnect';
1010
import useDeposit from '@/hooks/useDeposit';
11+
import { useDispatch } from '@/redux/hooks';
12+
import { setActiveView, setCurrentPath } from '@/redux/app.slice';
13+
import { NAV_ITEMS } from '@/components/layout/AppShell';
1114

1215
export default function Page() {
16+
const dispatch = useDispatch();
1317
const [selectedItem, setSelectedItem] = useState<IProposal | null>(null);
1418

1519
useEffect(() => {
1620
document.title = 'Governance';
21+
dispatch(setCurrentPath({
22+
currentPath: NAV_ITEMS[3].url,
23+
}));
24+
dispatch(setActiveView({
25+
activeView: NAV_ITEMS[3].id,
26+
}));
1727
}, []);
1828

1929
const {

apps/web/src/components/AppLink.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface DynamicProps {
1616
export default function AppLink({
1717
href,
1818
children,
19-
className = '',
19+
className = 'text-lumera-teal hover:text-lumera-green',
2020
target = '',
2121
rel = '',
2222
}: IAppLink) {
@@ -28,7 +28,7 @@ export default function AppLink({
2828
props.rel = rel;
2929
}
3030
return (
31-
<Link href={href} className={`text-lumera-teal hover:text-lumera-green ${className}`} target={target}>
31+
<Link href={href} className={className} target={target}>
3232
{children}
3333
</Link>
3434
);

apps/web/src/components/DelegateModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default function DelegateModal({
107107
<H3 className='!text-green-500 text-[32px] !leading-0'>Congratulations! delegate completed successfully.</H3>
108108
</div>
109109
<div className='mt-3'>
110-
<AppLink href={`/tx/${transactionHash}`} className='text-lumera-label text-sm'>View Transaction</AppLink>
110+
<AppLink href={`/tx/${transactionHash}`} className='text-lumera-teal hover:text-lumera-green text-sm'>View Transaction</AppLink>
111111
</div>
112112
</div>
113113
</Dialog.Content>

apps/web/src/components/DepositModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export default function DepositModal({
101101
<H3 className='!text-green-500 text-[32px] !leading-0'>Congratulations! deposit completed successfully.</H3>
102102
</div>
103103
<div className='mt-3'>
104-
<AppLink href={`/tx/${transactionHash}`} className='text-lumera-label text-sm'>View Transaction</AppLink>
104+
<AppLink href={`/tx/${transactionHash}`} className='text-lumera-teal hover:text-lumera-green text-sm'>View Transaction</AppLink>
105105
</div>
106106
</div>
107107
</Dialog.Content>

apps/web/src/components/RedelegateModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default function RedelegateModal({
106106
<div className='flex justify-center'>
107107
<CheckCircle className='w-12 h-12 text-lumera-green border border-lumera-green rounded-full p-3' />
108108
</div>
109-
<div className='mt-5 text-2xl'>Unbond Successfully</div>
109+
<div className='mt-5 text-2xl'>Redelegate Successfully</div>
110110
{optionsAdvanced?.amount ?
111111
<div className='mt-1'>You have restaked {optionsAdvanced?.amount} Lume</div> : null
112112
}

apps/web/src/components/SendModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default function SendModal({
103103
<H3 className='!text-green-500 text-[32px] !leading-0'>Congratulations! send completed successfully.</H3>
104104
</div>
105105
<div className='mt-3'>
106-
<AppLink href={`/tx/${transactionHash}`} className='text-lumera-label text-sm'>View Transaction</AppLink>
106+
<AppLink href={`/tx/${transactionHash}`} className='text-lumera-teal hover:text-lumera-green text-sm'>View Transaction</AppLink>
107107
</div>
108108
</div>
109109
</Dialog.Content>

apps/web/src/components/UnbondModal.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ export default function UnbondModal({
5656
}: IUnbondModal) {
5757
const [isYes, setYes] = useState(false);
5858

59-
const handleAdvancedCheckedChange = (checked: boolean) => {
60-
setYes(checked);
61-
}
62-
6359
if (transactionHash && isOpen) {
6460
return (
6561
<Dialog
@@ -213,7 +209,7 @@ export default function UnbondModal({
213209
id="termOfUse"
214210
size="$4"
215211
checked={isYes}
216-
onCheckedChange={handleAdvancedCheckedChange}
212+
onCheckedChange={(checked: boolean) => setYes(checked)}
217213
>
218214
<Checkbox.Indicator>
219215
<CheckCircle />

apps/web/src/components/layout/AppShell.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export default function AppShell({ children }: { children: React.ReactNode }) {
115115
<AppLink
116116
key={item.id}
117117
href={item?.url || '#'}
118-
className="text-base font-medium">
118+
className="text-lumera-teal hover:text-lumera-green text-base font-medium">
119119
<span
120120
onClick={() => handleMenuItemClick(item)}
121121
className={`flex items-center gap-3 px-4 py-3 transition-colors duration-200 rounded-lg w-full ${
@@ -162,7 +162,7 @@ export default function AppShell({ children }: { children: React.ReactNode }) {
162162
<AppLink
163163
key={item.id}
164164
href={item?.url || '#'}
165-
className="text-base font-medium">
165+
className="text-lumera-teal hover:text-lumera-green text-base font-medium">
166166
<span
167167
onClick={() => handleMenuItemClick(item)}
168168
className={`flex items-center gap-3 px-4 py-3 transition-colors duration-200 rounded-lg w-full ${

apps/web/src/hooks/useDelegate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ const useDelegate = (options: UseDepositOptions = {}) => {
100100
const handleSendClick = async () => {
101101
setError('');
102102
setTransactionHash('');
103-
if (!optionsAdvanced.amount || Number(optionsAdvanced.amount) <= 0) {
103+
if (!optionsAdvanced?.amount || Number(optionsAdvanced.amount) <= 0) {
104104
setError('Please enter amount.');
105105
return
106106
}
107-
if (options.availableAmount && Number(optionsAdvanced.amount) > Number(options.availableAmount)) {
107+
if (options?.availableAmount && Number(optionsAdvanced.amount) > Number(options.availableAmount)) {
108108
setError('Amount cannot exceed the available balance.');
109109
return
110110
}

0 commit comments

Comments
 (0)