- Direct access to{' '}
+
+
+ {' '}
+ {/* Fixed height container */}
+
+ Direct access to{' '}
{isMorphoBlue ? '{Morpho Blue}' : 'the most decentralized lending protocol.'}
- {' '}
+
-
-
+
+
Why Monarch
- View Portfolio
+
+ View Portfolio
+
diff --git a/app/info/components/info.tsx b/app/info/components/info.tsx
index bc0dffc1..594de6df 100644
--- a/app/info/components/info.tsx
+++ b/app/info/components/info.tsx
@@ -3,7 +3,9 @@
'use client';
import { useState, useEffect, useRef } from 'react';
+import { Button } from '@nextui-org/react';
import Image from 'next/image';
+import { FaChevronLeft, FaChevronRight } from 'react-icons/fa';
import Header from '@/components/layout/header/Header';
import { sections } from './sectionData';
@@ -30,35 +32,35 @@ function InfoPage() {
setTimeout(() => setIsTransitioning(false), 500);
};
- // eslint-disable-next-line react-hooks/exhaustive-deps
const nextSection = () => changeSection('next');
- // eslint-disable-next-line react-hooks/exhaustive-deps
const prevSection = () => changeSection('prev');
useEffect(() => {
const container = containerRef.current;
if (!container) return;
- let lastScrollTime = 0;
- const scrollCooldown = 1000; // 1 second cooldown
+ let lastWheelTime = 0;
+ const wheelThreshold = 50; // Minimum time between wheel events in ms
const handleWheel = (e: WheelEvent) => {
- e.preventDefault();
- const now = new Date().getTime();
- if (now - lastScrollTime < scrollCooldown) return;
+ const now = Date.now();
+ if (now - lastWheelTime < wheelThreshold) return;
- if (e.deltaY > 0) {
- nextSection();
- } else {
- prevSection();
+ if (Math.abs(e.deltaX) > Math.abs(e.deltaY) && Math.abs(e.deltaX) > 5) {
+ e.preventDefault();
+ if (e.deltaX > 0) {
+ nextSection();
+ } else {
+ prevSection();
+ }
+ lastWheelTime = now;
}
- lastScrollTime = now;
};
const handleKeyDown = (e: KeyboardEvent) => {
- if (e.key === 'ArrowDown') {
+ if (e.key === 'ArrowRight') {
nextSection();
- } else if (e.key === 'ArrowUp') {
+ } else if (e.key === 'ArrowLeft') {
prevSection();
}
};
@@ -72,58 +74,90 @@ function InfoPage() {
};
}, [nextSection, prevSection]);
+ const renderImage = (section: typeof sections[0], index: number) => (
+
+
+
+ );
+
if (!isClient) {
return null; // or a loading spinner
}
return (
-
+
-
-
+
+
- {sections.map((section) => (
-
-
- {section.mainTitle}
- {section.subTitle}
-
-
-
+ {sections.map((section, index) => (
+
+
+
+ {section.mainTitle}
+
+
+ {section.subTitle}
+
+
+ {renderImage(section, index)}
+
+ {section.content}
- {section.content}
))}
+
+
+
+
+
-
);
}
diff --git a/app/info/components/sectionData.tsx b/app/info/components/sectionData.tsx
index 947c47a4..b54272c6 100644
--- a/app/info/components/sectionData.tsx
+++ b/app/info/components/sectionData.tsx
@@ -4,6 +4,19 @@ import monarchImage from '../../../src/imgs/intro/direct-supply.png';
import morphoImage from '../../../src/imgs/intro/morpho.png';
import vaultsImage from '../../../src/imgs/intro/vaults.png';
+function Card({ title, items }: { title: string; items: string[] }) {
+ return (
+
+ {title}
+
+ {items.map((item, index) => (
+ - {item}
+ ))}
+
+
+ );
+}
+
export const sections = [
{
mainTitle: 'Introducing Monarch',
@@ -14,27 +27,15 @@ export const sections = [
Morpho Blue is the core protocol of the Morpho
ecosystem. It's a decentralized, immutable, and neutral lending protocol that enables the
- creation of lending markets with any assets in a truly decentralized manner. As a{' '}
-
- hyperstructure
-
- , Morpho Blue embodies unstoppable, free, and neutral DeFi primitives.
+ creation of lending markets with any assets in a truly decentralized manner.
- Built with a minimalistic and unopinionated approach, Morpho Blue is the foundation upon
- which the entire Morpho ecosystem is constructed. Its efficiency and security have made it
- highly regarded in the DeFi community, positioning it as the most crucial element in
- Morpho's architecture.
+ Built with a minimalistic approach, Morpho Blue is the foundation of the entire Morpho
+ ecosystem. Its efficiency and security have made it highly regarded in the DeFi community.
Monarch serves as an advanced interface for Morpho Blue, providing users with a gateway to
- interact with this powerful core protocol. As we explore Morpho's ecosystem, understanding
- Morpho Blue is essential, as it underpins all other components and functionalities.
+ interact with this powerful core protocol.
>
),
@@ -45,38 +46,29 @@ export const sections = [
image: vaultsImage,
content: (
<>
-
+
The Morpho Lab team introduces Morpho Vaults,
intermediate contracts managed by curators to simplify risk management for normal
- suppliers. This is the recommended way to interact with Morpho Blue, as it offers a more
- user-friendly experience and simplified risk management.
-
-
- Advantages:
-
- - Simplified user experience, managed risk exposure
- - Easier to reuse the supplied liquidity as ERC4626 tokens.
- -
- {' '}
- Learn more about{' '}
-
- Benefit of Morpho Vaults
- {' '}
-
-
-
-
- Limitations:
-
- - Less control over lending parameter changes
- - Limited customization options
- - Potential performance fees
-
+ suppliers.
+
+
+
+
>
),
},
@@ -86,35 +78,29 @@ export const sections = [
image: monarchImage,
content: (
<>
-
+
Monarch empowers advanced users by enabling{' '}
direct lending to Morpho Blue markets, bypassing the
- need for vaults. This approach offers greater control and customization over your lending
- positions.
-
-
- Benefits:
-
- - Full control over lending parameters
- - Customizable risk management
- - No performance fees
-
-
-
- Considerations:
-
- - Deep understanding of market risks needed
- - Currently requires manual rebalancing
- -
- {' '}
- Learn more about the risks{' '}
-
- {' '}
- here{' '}
- {' '}
-
-
+ need for vaults.
+
+
+
+
>
),
},
@@ -122,33 +108,30 @@ export const sections = [
mainTitle: 'The Future of Monarch',
subTitle: 'Automation and Beyond',
image: logoImage,
- customHeight: 200,
content: (
<>
Coming Soon: Monarch Auto
- We're developing "Monarch Auto", a feature that will help automate the rebalancing process
- with your custom strategies. This will combine the benefits of direct market access with
- automated management.
+ We're developing "Monarch Auto" to automate the rebalancing process with custom
+ strategies.
What's in Progress:
- Automated rebalancing strategies
- Enhanced risk management tools
- - Improved user interface and experience
+ - Improved user interface
We Value Your Feedback!
- Your input is crucial in shaping the future of Monarch. We encourage you to share your
- thoughts, suggestions, and any issues you encounter. Please send your feedback to
+ Your input is crucial in shaping Monarch's future. Share your thoughts in our{' '}
- {' '}
- our telegram chat here{' '}
+ Telegram chat
+ .
>
),
diff --git a/src/components/FeedInfo/OracleFeedInfo.tsx b/src/components/FeedInfo/OracleFeedInfo.tsx
index 96a85b1e..8ace4dde 100644
--- a/src/components/FeedInfo/OracleFeedInfo.tsx
+++ b/src/components/FeedInfo/OracleFeedInfo.tsx
@@ -40,20 +40,19 @@ export function OracleFeedInfo({
);
- return (
-
+
-
- {content}
-
-
-
- );
- }
-
+ {content}
+
+
+
+ );
+}
diff --git a/src/components/OracleVendorBadge.tsx b/src/components/OracleVendorBadge.tsx
index e9bace9f..1dc0f224 100644
--- a/src/components/OracleVendorBadge.tsx
+++ b/src/components/OracleVendorBadge.tsx
@@ -10,11 +10,12 @@ type OracleVendorBadgeProps = {
useTooltip?: boolean;
};
-const renderVendorIcon = (vendor: OracleVendors) => (
- OracleVendorIcons[vendor]
- ?
- :
-);
+const renderVendorIcon = (vendor: OracleVendors) =>
+ OracleVendorIcons[vendor] ? (
+
+ ) : (
+
+ );
function OracleVendorBadge({ oracleData, useTooltip = true }: OracleVendorBadgeProps) {
const { vendors } = parseOracleVendors(oracleData);
@@ -32,9 +33,7 @@ function OracleVendorBadge({ oracleData, useTooltip = true }: OracleVendorBadgeP
) : (
vendors.map((vendor, index) => (
-
- {renderVendorIcon(vendor)}
-
+ {renderVendorIcon(vendor)}
))
)}
@@ -65,6 +64,6 @@ function OracleVendorBadge({ oracleData, useTooltip = true }: OracleVendorBadgeP
}
return content;
-};
+}
export default OracleVendorBadge;
diff --git a/src/components/layout/header/NavbarMobile.tsx b/src/components/layout/header/NavbarMobile.tsx
index e53380bb..5cd03ad2 100644
--- a/src/components/layout/header/NavbarMobile.tsx
+++ b/src/components/layout/header/NavbarMobile.tsx
@@ -12,15 +12,16 @@ export default function NavbarMobile() {
const { address } = useAccount();
+ const navbarClass = [
+ 'flex flex-1 flex-grow items-center justify-between',
+ 'rounded-sm bg-primary p-4 backdrop-blur-2xl',
+ 'mx-4',
+ ].join(' ');
+
if (isMobileMenuOpen) {
return (
+ Direct access to{' '} {isMorphoBlue ? '{Morpho Blue}' : 'the most decentralized lending protocol.'} - {' '} +
{section.mainTitle}
-{section.subTitle}
-+ {section.mainTitle} +
++ {section.subTitle} +
+{title}
+-
+ {items.map((item, index) => (
+
- {item} + ))} +
Morpho Blue is the core protocol of the Morpho ecosystem. It's a decentralized, immutable, and neutral lending protocol that enables the - creation of lending markets with any assets in a truly decentralized manner. As a{' '} - - hyperstructure - - , Morpho Blue embodies unstoppable, free, and neutral DeFi primitives. + creation of lending markets with any assets in a truly decentralized manner.
- Built with a minimalistic and unopinionated approach, Morpho Blue is the foundation upon - which the entire Morpho ecosystem is constructed. Its efficiency and security have made it - highly regarded in the DeFi community, positioning it as the most crucial element in - Morpho's architecture. + Built with a minimalistic approach, Morpho Blue is the foundation of the entire Morpho + ecosystem. Its efficiency and security have made it highly regarded in the DeFi community.
Monarch serves as an advanced interface for Morpho Blue, providing users with a gateway to - interact with this powerful core protocol. As we explore Morpho's ecosystem, understanding - Morpho Blue is essential, as it underpins all other components and functionalities. + interact with this powerful core protocol.
> ), @@ -45,38 +46,29 @@ export const sections = [ image: vaultsImage, content: ( <> -+
The Morpho Lab team introduces Morpho Vaults, intermediate contracts managed by curators to simplify risk management for normal - suppliers. This is the recommended way to interact with Morpho Blue, as it offers a more - user-friendly experience and simplified risk management. -
-- Advantages: -
-
-
- Simplified user experience, managed risk exposure -
- Easier to reuse the supplied liquidity as ERC4626 tokens. -
- - {' '} - Learn more about{' '} - - Benefit of Morpho Vaults - {' '} - -
- Limitations: -
-
-
- Less control over lending parameter changes -
- Limited customization options -
- Potential performance fees -
+
Monarch empowers advanced users by enabling{' '} direct lending to Morpho Blue markets, bypassing the - need for vaults. This approach offers greater control and customization over your lending - positions. -
-- Benefits: -
-
-
- Full control over lending parameters -
- Customizable risk management -
- No performance fees -
- Considerations: -
-
-
- Deep understanding of market risks needed -
- Currently requires manual rebalancing -
- - {' '} - Learn more about the risks{' '} - - {' '} - here{' '} - {' '} - -
Coming Soon: Monarch Auto
- We're developing "Monarch Auto", a feature that will help automate the rebalancing process
- with your custom strategies. This will combine the benefits of direct market access with
- automated management.
+ We're developing "Monarch Auto" to automate the rebalancing process with custom
+ strategies.
What's in Progress:
- Automated rebalancing strategies
- Enhanced risk management tools -
- Improved user interface and experience +
- Improved user interface
We Value Your Feedback!
- Your input is crucial in shaping the future of Monarch. We encourage you to share your
- thoughts, suggestions, and any issues you encounter. Please send your feedback to
+ Your input is crucial in shaping Monarch's future. Share your thoughts in our{' '}
- {' '}
- our telegram chat here{' '}
+ Telegram chat
+ .