From a0ee9e006766b7e1896d0a24c9501c4810c7353e Mon Sep 17 00:00:00 2001 From: mistryvinay Date: Sat, 21 Dec 2024 22:31:30 +0000 Subject: [PATCH 1/4] Added Federation/Investor Relations page to Marketflow --- .../ContentDistribution.js | 47 ++++ .../ContentDistribution/Investors.js | 230 ++++++++++++++++++ 2 files changed, 277 insertions(+) create mode 100644 AppExamples/CleverDeal.React/src/Components/ContentDistribution/Investors.js diff --git a/AppExamples/CleverDeal.React/src/Components/ContentDistribution/ContentDistribution.js b/AppExamples/CleverDeal.React/src/Components/ContentDistribution/ContentDistribution.js index 93e1c61..0c1e30c 100644 --- a/AppExamples/CleverDeal.React/src/Components/ContentDistribution/ContentDistribution.js +++ b/AppExamples/CleverDeal.React/src/Components/ContentDistribution/ContentDistribution.js @@ -1,8 +1,10 @@ +import React, { useState, useEffect } from 'react'; import { Menu, Search, TrendingDown, TrendingUp } from 'lucide-react'; import { Link, Route, Routes, useLocation } from "react-router-dom"; import { Line, LineChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'; import MarketFeed from './MarketFeed'; import MarketFlow from './MarketFlow'; +import InvestorRelations from './Investors'; import logo from './img/marketflow-logo.png'; import help_gif from './img/marketflow-help.gif'; @@ -39,6 +41,7 @@ const getNavItems = () => [ { name: 'Market Feed', path: '/content/feed' }, { name: 'News', path: '/content/news' }, { name: 'Brokers', path: '/content/brokers' }, + { name: 'Investor Relations', path: '/content/investor' }, { name: 'Help', path: '/content/help' }, { name: 'Clever Deal', path: '/' }, ]; @@ -50,6 +53,7 @@ export const ContentDistribution = withTailwindCSS(() => } /> } /> } /> + } /> } /> } /> @@ -292,6 +296,49 @@ function Brokers() { ); } +function Investor() { + const location = useLocation(); + const navItems = getNavItems(); + + return ( +
+
+
+ Market Flow Logo + Market Flow + +
+
+
+ + +
+ +
+
+ +

+ Investor Relations +

+ +
+ ); +} + function Help() { const location = useLocation(); const navItems = getNavItems(); diff --git a/AppExamples/CleverDeal.React/src/Components/ContentDistribution/Investors.js b/AppExamples/CleverDeal.React/src/Components/ContentDistribution/Investors.js new file mode 100644 index 0000000..31deef5 --- /dev/null +++ b/AppExamples/CleverDeal.React/src/Components/ContentDistribution/Investors.js @@ -0,0 +1,230 @@ +import React, { useState } from 'react'; +import logo from './img/marketflow-logo.png'; +import { withTailwindCSS } from '../../Utils/hooks'; + +const InvestorRelations = () => { + const [showForm, setShowForm] = useState(false); + const [formData, setFormData] = useState({ + firstName: '', + lastName: '', + company: '', + phone: '', + countryCode: '' + }); + const [formError, setFormError] = useState(''); + const [submissionStatus, setSubmissionStatus] = useState(null); + const [isSubmitting, setIsSubmitting] = useState(false); + + const handleFormChange = (e) => { + const { name, value } = e.target; + setFormData((prevData) => ({ ...prevData, [name]: value })); + }; + + const handleFormSubmit = async () => { + if (!formData.firstName || !formData.phone || !formData.countryCode) { + setFormError('All fields are required except "Company".'); + setSubmissionStatus('error'); + return; + } + + setIsSubmitting(true); + + // Remove leading zero from phone number if present + const formattedPhone = formData.phone.startsWith('0') + ? formData.phone.slice(1) + : formData.phone; + + const payload = { + companyName: formData.company || '', + emailAddress: '', // Not required + externalNetwork: 'WHATSAPP', + firstName: formData.firstName, + lastName: formData.lastName, + onboarderEmailAddress: 'vinay@symphony.com', + phoneNumber: `${formData.countryCode}${formattedPhone}`, + advisorSymphonyIds: ['349026222342678'], + advisorEmailAddresses: ['vinay@symphony.com'] + }; + + try { + const response = await fetch('https://poc.symphonymarket.solutions/onboard_user', { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(payload) + }); + + if (response.ok) { + setFormError(''); + setSubmissionStatus('success'); + } else { + setFormError('Failed to submit the form. Please try again.'); + setSubmissionStatus('error'); + } + } catch (error) { + setFormError('An error occurred. Please check your network and try again.'); + setSubmissionStatus('error'); + } finally { + setIsSubmitting(false); + } + + // Keep the modal open briefly to show the status + setTimeout(() => { + setShowForm(false); + setSubmissionStatus(null); + }, 3000); + }; + + const openForm = () => { + setFormData({ + firstName: '', + lastName: '', + company: '', + phone: '', + countryCode: '' + }); + setShowForm(true); + setSubmissionStatus(null); + }; + + return ( +
+
+
+

Key insights and resources for Market Flow investors.

+
+
+ Investor Relations +
+
+
+

Company Overview

+

+ Market Flow is a leading innovator in content distribution technology, leveraging advanced networks to connect users and businesses in real time. Founded in 2020, Market Flow has rapidly expanded its global footprint with partnerships spanning finance, tech, and media sectors. +

+
+
+

Key Financial Highlights

+
    +
  • 2023 Revenue: $150M (30% YoY growth)
  • +
  • Net Income: $25M
  • +
  • Global User Base: 1.2M active users
  • +
  • Partnerships with 200+ leading organizations
  • +
+
+
+

Contact Investor Relations

+ + {showForm && ( +
+
+

Contact via WhatsApp

+
+ {formError &&

{formError}

} + {submissionStatus === 'success' &&

Form submitted successfully!

} +
+ + +
+
+ + +
+
+ + +
+
+ +
+ + +
+
+
+
+ {isSubmitting && ( +
+ + Submitting... +
+ )} + {!isSubmitting && ( + + )} + +
+
+
+ )} +
+
+
+
+
+ © 2025 Market Flow. All rights reserved. +
+
+
+ ); +}; + +export default withTailwindCSS(InvestorRelations); \ No newline at end of file From d00ecab2eab2d55e0a3e9c8559ec86a08880c50d Mon Sep 17 00:00:00 2001 From: mistryvinay Date: Mon, 23 Dec 2024 00:12:49 +0000 Subject: [PATCH 2/4] Updated advisor workflow --- .../src/Components/ContentDistribution/Investors.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AppExamples/CleverDeal.React/src/Components/ContentDistribution/Investors.js b/AppExamples/CleverDeal.React/src/Components/ContentDistribution/Investors.js index 31deef5..6532767 100644 --- a/AppExamples/CleverDeal.React/src/Components/ContentDistribution/Investors.js +++ b/AppExamples/CleverDeal.React/src/Components/ContentDistribution/Investors.js @@ -40,10 +40,10 @@ const InvestorRelations = () => { externalNetwork: 'WHATSAPP', firstName: formData.firstName, lastName: formData.lastName, - onboarderEmailAddress: 'vinay@symphony.com', + onboarderEmailAddress: 'investorrelations@marketflowllc.com', phoneNumber: `${formData.countryCode}${formattedPhone}`, - advisorSymphonyIds: ['349026222342678'], - advisorEmailAddresses: ['vinay@symphony.com'] + advisorSymphonyIds: ['349026222362736'], + advisorEmailAddresses: ['investorrelations@marketflowllc.com'] }; try { From 5cd489c9eb943ee45783151e73dd2e38083d6b2f Mon Sep 17 00:00:00 2001 From: mistryvinay Date: Fri, 27 Dec 2024 19:22:25 +0000 Subject: [PATCH 3/4] Updated form handling --- .../src/Components/ContentDistribution/Investors.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AppExamples/CleverDeal.React/src/Components/ContentDistribution/Investors.js b/AppExamples/CleverDeal.React/src/Components/ContentDistribution/Investors.js index 6532767..3f5c26c 100644 --- a/AppExamples/CleverDeal.React/src/Components/ContentDistribution/Investors.js +++ b/AppExamples/CleverDeal.React/src/Components/ContentDistribution/Investors.js @@ -42,10 +42,12 @@ const InvestorRelations = () => { lastName: formData.lastName, onboarderEmailAddress: 'investorrelations@marketflowllc.com', phoneNumber: `${formData.countryCode}${formattedPhone}`, - advisorSymphonyIds: ['349026222362736'], - advisorEmailAddresses: ['investorrelations@marketflowllc.com'] + advisorSymphonyIds: null, + advisorEmailAddresses: null }; + console.log('Payload:', payload); // Log the payload for debugging + try { const response = await fetch('https://poc.symphonymarket.solutions/onboard_user', { method: 'POST', @@ -84,6 +86,7 @@ const InvestorRelations = () => { phone: '', countryCode: '' }); + setFormError(''); setShowForm(true); setSubmissionStatus(null); }; From 30c29d701353698c897cf397b38a0711db9512a1 Mon Sep 17 00:00:00 2001 From: Vinay Mistry Date: Wed, 29 Jan 2025 15:33:51 +0000 Subject: [PATCH 4/4] Updated light theme text colour (#42) --- AppExamples/CleverDeal.React/src/Theme/default.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AppExamples/CleverDeal.React/src/Theme/default.json b/AppExamples/CleverDeal.React/src/Theme/default.json index 8892688..127e20d 100644 --- a/AppExamples/CleverDeal.React/src/Theme/default.json +++ b/AppExamples/CleverDeal.React/src/Theme/default.json @@ -9,8 +9,8 @@ "error": "#C51162", "background": "#FFFFFF", "surface": "#F6F6FC", - "onPrimary": "#FFFFFF", - "onSecondary": "#000000", + "onPrimary": "#000000", + "onSecondary": "#FFFFFF", "onBackground": "#000000", "onSurface": "#000000", "onError": "#FFFFFF",