Update and rename docusaurus/docs/title-and-meta-tags.md to Iwacubusi…#17159
Update and rename docusaurus/docs/title-and-meta-tags.md to Iwacubusi…#17159iwacubusinessonline-pixel wants to merge 1 commit intofacebook:mainfrom
Conversation
…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
|
Hi @iwacubusinessonline-pixel! Thank you for your pull request and welcome to our community. Action RequiredIn 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. ProcessIn 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 If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
iwacubusinessonline-pixel:patch-1 |
…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