Skip to content

Conversation

@iwacubusinessonline-pixel

…ness.onlineimport { useState } from "react";
import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Globe, Youtube, CreditCard } from "lucide-react";
import { motion, AnimatePresence } from "framer-motion";
import emailjs from "emailjs-com";

export default function IwacuBusinessOnline() {
const [depositForm, setDepositForm] = useState({ amount: "", name: "", phone: "", screenshot: "" });
const [withdrawForm, setWithdrawForm] = useState({ amount: "" });
const [depositStatus, setDepositStatus] = useState("");
const [withdrawStatus, setWithdrawStatus] = useState("");

const investmentPackages = [
{ amount: 50, daily: 50, days: 30, total: 1500 },
{ amount: 100, daily: 100, days: 30, total: 3000 },
{ amount: 3000, daily: 300, days: 30, total: 9000 },
{ amount: 5000, daily: 500, days: 30, total: 15000 },
{ amount: 10000, daily: 1000, days: 30, total: 30000 },
{ amount: 20000, daily: 2000, days: 30, total: 60000 },
{ amount: 50000, daily: 5000, days: 30, total: 150000 },
{ amount: 100000, daily: 10000, days: 30, total: 300000 },
];

// Deposit handlers
const handleDepositChange = (e) => setDepositForm({ ...depositForm, [e.target.name]: e.target.value });
const validateDeposit = () => {
const amount = Number(depositForm.amount);
if (!depositForm.name.trim()) return "Andika amazina yawe";
if (!depositForm.phone.trim() || !/^\d{10}$/.test(depositForm.phone)) return "Shyiramo numero ikwiye";
if (!depositForm.screenshot.trim()) return "Shyiramo screenshot";
if (!amount || amount < 50 || amount > 300000) return "Shyiramo umubare hagati ya 50 na 300000 RWF";
return null;
};
const handleDepositSubmit = (e) => {
e.preventDefault();
const error = validateDeposit();
if (error) { setDepositStatus(error); return; }
setDepositStatus("Ohereza...");
emailjs.send(
"👉 service_x1abc",
"👉 template_deposit",
{ ...depositForm },
"👉 A1B2C3D4E5"
).then(() => {
setDepositStatus("Deposit request yoherejwe ✅. Tuzayemeza mugihe cyose.");
setDepositForm({ amount: "", name: "", phone: "", screenshot: "" });
setTimeout(() => setDepositStatus(""), 5000);
}, () => { setDepositStatus("Habaye ikosa. Gerageza kongera."); setTimeout(() => setDepositStatus(""), 5000); });
};

// Withdraw handlers
const handleWithdrawChange = (e) => setWithdrawForm({ ...withdrawForm, [e.target.name]: e.target.value });
const validateWithdraw = () => {
const amount = Number(withdrawForm.amount);
if (!amount || amount < 50 || amount > 300000) return "Shyiramo umubare hagati ya 50 na 300000 RWF";
return null;
};
const handleWithdrawSubmit = (e) => {
e.preventDefault();
const error = validateWithdraw();
if (error) { setWithdrawStatus(error); return; }
setWithdrawStatus("Ohereza request...");
emailjs.send(
"👉 service_x1abc",
"👉 template_withdraw",
{ amount: withdrawForm.amount, name: depositForm.name, phone: depositForm.phone },
"👉 A1B2C3D4E5"
).then(() => {
setWithdrawStatus("Withdraw request yoherejwe ✅. Tuzayemeza mu masaha 24.");
setWithdrawForm({ amount: "" });
setTimeout(() => setWithdrawStatus(""), 5000);
}, () => { setWithdrawStatus("Habaye ikosa. Gerageza kongera."); setTimeout(() => setWithdrawStatus(""), 5000); });
};

return (


{/* Header */}


  {/* Hero Section */}
  <section className="text-center py-20 bg-blue-100">
    <motion.h2 initial={{ opacity: 0, y: -20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.8 }} className="text-4xl font-bold mb-4 text-blue-700">
      Boost Your Channel & Invest Wisely
    </motion.h2>
    <p className="text-lg mb-6">Kwizamura kuri YouTube, gushora imari, no kubika amafaranga mu buryo bwizewe.</p>
    <Button className="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-2xl">Tangira nonaha / Get Started</Button>
  </section>

  {/* About Section */}
  <section id="about" className="py-16 container mx-auto px-4">
    <h3 className="text-2xl font-bold text-center mb-6 text-blue-700">Ibyerekeye Twebwe / About Us</h3>
    <p className="text-center max-w-2xl mx-auto text-gray-700">Turi urubuga rw’Abanyarwanda rugamije gufasha abantu kumenyekana no guteza imbere ibikorwa byabo binyuze mu ikoranabuhanga. Duhuza abashoramari n’abanyamwuga mu itangazamakuru kugira ngo bakorane mu buryo bunoze kandi buboneye.</p>
  </section>

  {/* Services Section */}
  <section id="services" className="py-16 bg-white">
    <h3 className="text-2xl font-bold text-center mb-10 text-blue-700">Serivisi Zacu / Our Services</h3>
    <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6 container mx-auto px-4">
      <Card><CardContent className="flex flex-col items-center p-6 text-center"><Youtube className="w-10 h-10 text-blue-600 mb-3" /><h4 className="font-semibold mb-2">Kwizamura kuri YouTube</h4><p>Tugufasha kongera abareba, abiyandikisha n’ibitekerezo kuri channel yawe.</p></CardContent></Card>
      <Card><CardContent className="flex flex-col items-center p-6 text-center"><Globe className="w-10 h-10 text-blue-600 mb-3" /><h4 className="font-semibold mb-2">Investment Opportunities</h4><p>Shora imari muri website zibyara inyungu n’imishinga y’ikoranabuhanga.</p></CardContent></Card>
      <Card><CardContent className="flex flex-col items-center p-6 text-center"><CreditCard className="w-10 h-10 text-blue-600 mb-3" /><h4 className="font-semibold mb-2">Digital Marketing</h4><p>Kwimenyekanisha kuri social media no ku rubuga rwawe ku rwego rwagutse.</p></CardContent></Card>
      <Card><CardContent className="flex flex-col items-center p-6 text-center"><Globe className="w-10 h-10 text-blue-600 mb-3" /><h4 className="font-semibold mb-2">Website Development</h4><p>Tugukorera website yihariye ifite design y’umwimerere kandi yihuse.</p></CardContent></Card>
    </div>
  </section>

  {/* Investment Packages */}
  <section id="packages" className="py-16 bg-blue-50">
    <h3 className="text-2xl font-bold text-center mb-6 text-blue-700">Investment Packages</h3>
    <div className="container mx-auto px-4 grid md:grid-cols-2 lg:grid-cols-4 gap-6">
      {investmentPackages.map((pkg, idx) => (
        <Card key={idx}><CardContent className="p-4 text-center"><h4 className="font-bold text-lg mb-2">{pkg.amount} RWF</h4><p>Buri munsi: {pkg.daily} RWF</p><p>Iminsi: {pkg.days}</p><p>Total inyungu: {pkg.total} RWF</p></CardContent></Card>
      ))}
    </div>
  </section>

  {/* Deposit */}
  <section id="deposit" className="py-16 bg-white">
    <h3 className="text-2xl font-bold text-center mb-6 text-blue-700">Deposit / Kubitsa</h3>
    <div className="max-w-md mx-auto bg-white p-6 rounded-2xl shadow-md">
      <form onSubmit={handleDepositSubmit} className="space-y-4">
        <Label htmlFor="amount">Umubare w'amafaranga (50 - 300000 RWF)</Label>
        <Input type="number" name="amount" value={depositForm.amount} onChange={handleDepositChange} required />
        <Label htmlFor="name">Amazina yawe</Label>
        <Input type="text" name="name" value={depositForm.name} onChange={handleDepositChange} required />
        <Label htmlFor="phone">Numero yakoresheje</Label>
        <Input type="text" name="phone" value={depositForm.phone} onChange={handleDepositChange} required />
        <Label htmlFor="screenshot">Screenshot / Proof</Label>
        <Input type="text" name="screenshot" value={depositForm.screenshot} onChange={handleDepositChange} required />
        <motion.div whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }}>
          <Button type="submit" className="w-full bg-blue-600 hover:bg-blue-700 text-white">Ohereza Deposit</Button>
        </motion.div>
      </form>
      <AnimatePresence>
        {depositStatus && (<motion.p initial={{ opacity: 0, y: -10 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: -10 }} className="text-center text-gray-700 mt-4 font-medium">{depositStatus}</motion.p>)}
      </AnimatePresence>
      <p className="mt-4 text-gray-700 text-center">Kohereza amafaranga kuri: <strong>0787472805</strong><br/>Amazina: <strong>Jean Baptiste</strong></p>
    </div>
  </section>

  {/* Withdraw */}
  <section id="withdraw" className="py-16 bg-blue-50">
    <h3 className="text-2xl font-bold text-center mb-6 text-blue-700">Withdraw / Kubikuza</h3>
    <div className="max-w-md mx-auto bg-white p-6 rounded-2xl shadow-md">
      <form onSubmit={handleWithdrawSubmit} className="space-y-4">
        <Label htmlFor="amount">Umubare w'amafaranga (50 - 300000 RWF)</Label>
        <Input type="number" name="amount" value={withdrawForm.amount} onChange={handleWithdrawChange} required />
        <motion.div whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }}>
          <Button type="submit" className="w-full bg-blue-600 hover:bg-blue-700 text-white">Ohereza Withdraw Request</Button>
        </motion.div>
      </form>
      <AnimatePresence>
        {withdrawStatus && (<motion.p initial={{ opacity: 0, y: -10 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: -10 }} className="text-center text-gray-700 mt-4 font-medium">{withdrawStatus}</motion.p>)}
      </AnimatePresence>
    </div>
  </section>

  {/* Contact */}
  <section id="contact" className="py-16 bg-white">
    <h3 className="text-2xl font-bold text-center mb-6 text-blue-700">Vugana Natwe / Contact Us</h3>
    <div className="text-center text-gray-700">
      <p>📞 WhatsApp / Phone: +250 787 472 805</p>
      <p>✉️ Email: [email protected]</p>
      <p>🕓 Igihe dukorera: 08:00 - 20:00</p>
    </div>
  </section>

  {/* Footer */}
  <

        {withdrawStatus && (<motion.p initial={{ opacity: 0, y: -10 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: -10 }} className="text-center text-gray-700 mt-4 font-medium">{withdrawStatus}</motion.p>)}
      </AnimatePresence>
    </div>
  </sectmeta-tags

title: Title and Meta Tags
sidebar_label: Title & Meta Tags

Changing the title tag

You can find the source HTML file in the public folder of the generated project. You may edit the <title> tag in it to change the title from “React App” to anything else.

Note that normally you wouldn’t edit files in the public folder very often. For example, adding a stylesheet is done without touching the HTML.

If you need to dynamically update the page title based on the content, you can use the browser document.title API. For more complex scenarios when you want to change the title from React components, you can use React Helmet, a third party library.

If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in this section. Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered here.

Generating Dynamic <meta> Tags on the Server

Since Create React App doesn’t support server rendering, you might be wondering how to make <meta> tags dynamic and reflect the current URL. To solve this, we recommend to add placeholders into the HTML, like this:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta property="og:title" content="__OG_TITLE__" />
    <meta property="og:description" content="__OG_DESCRIPTION__" />
  </head>
</html>

Then, on the server, regardless of the backend you use, you can read index.html into memory and replace `__OG

…ness.online

            {withdrawStatus && (<motion.p initial={{ opacity: 0, y: -10 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: -10 }} className="text-center text-gray-700 mt-4 font-medium">{withdrawStatus}</motion.p>)}
          </AnimatePresence>
        </div>
      </sectmeta-tags
title: Title and Meta Tags
sidebar_label: Title & Meta Tags
---

## Changing the title tag

You can find the source HTML file in the `public` folder of the generated project. You may edit the `<title>` tag in it to change the title from “React App” to anything else.

Note that normally you wouldn’t edit files in the `public` folder very often. For example, [adding a stylesheet](adding-a-stylesheet.md) is done without touching the HTML.

If you need to dynamically update the page title based on the content, you can use the browser [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more complex scenarios when you want to change the title from React components, you can use [React Helmet](https://github.com/nfl/react-helmet), a third party library.

If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in [this section](#generating-dynamic-meta-tags-on-the-server). Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered [here](pre-rendering-into-static-html-files.md).

## Generating Dynamic `<meta>` Tags on the Server

Since Create React App doesn’t support server rendering, you might be wondering how to make `<meta>` tags dynamic and reflect the current URL. To solve this, we recommend to add placeholders into the HTML, like this:

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta property="og:title" content="__OG_TITLE__" />
    <meta property="og:description" content="__OG_DESCRIPTION__" />
  </head>
</html>
```

Then, on the server, regardless of the backend you use, you can read `index.html` into memory and replace `__OG
@meta-cla
Copy link

meta-cla bot commented Oct 22, 2025

Hi @iwacubusinessonline-pixel!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@iwacubusinessonline-pixel
Copy link
Author

iwacubusinessonline-pixel:patch-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant