Update and rename docusaurus/docs/title-and-meta-tags.md to Iwacubusi… #17159
+33
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…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 */}
Iwacu Business.online
About Us
Services
Packages
Deposit
Withdraw
Contact
title: Title and Meta Tags
sidebar_label: Title & Meta Tags
Changing the title tag
You can find the source HTML file in the
publicfolder 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
publicfolder 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.titleAPI. 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 ServerSince 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:Then, on the server, regardless of the backend you use, you can read
index.htmlinto memory and replace `__OG