diff --git a/src/App.jsx b/src/App.jsx index da4af3d..80c21e3 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,7 +3,6 @@ import { HashRouter as Router, Routes, Route } from "react-router-dom"; import { useTranslation } from "react-i18next"; import { importFile, exportFile } from "./utils"; import { allThemes } from "./data/themes"; - import { useUndoRedo } from "./hooks/useUndoRedo"; // Components @@ -14,6 +13,8 @@ import About from "./components/About"; import Welcome from "./components/Welcome"; import Footer from "./components/Footer"; import BackToTopButton from "./components/BackToTopButton"; +import TermsOfUse from "./components/TermsOfUse"; +import PrivacyPolicy from "./components/PrivacyPolicy"; function App() { const { t } = useTranslation(); @@ -34,7 +35,7 @@ function App() { redo, canUndo, canRedo, - reset: resetHistory + reset: resetHistory, } = useUndoRedo("", 50); const handleFileImport = (file) => { @@ -50,7 +51,6 @@ function App() { ); }; - // Export handler const handleExport = () => { exportFile(text, "exported_text.txt"); showAlert(t("alerts.textExported"), "success"); @@ -61,33 +61,10 @@ function App() { const theme = currentTheme.category === "light" ? "light" : "dark"; const showAlert = (message, type) => { - setAlert({ - msg: message, - type: type, - }); - setTimeout(() => { - setAlert(null); - }, 1500); + setAlert({ msg: message, type }); + setTimeout(() => setAlert(null), 1500); }; - // const toggleTheme = () => { - // if (theme === "light") { - // // Switch to dark mode - // setTheme("dark"); - // setColorTheme("linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%)"); - // } else { - // setTheme("light"); - // setColorTheme("linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%)"); - // } - // }; - - // const addColorTheme = (colorName, bgColor) => { - // if (theme === "dark") { - // setColorTheme(bgColor); - // showAlert(`${colorName} theme applied!`, "success"); - // } else { - // showAlert("Enable Dark Mode to use color themes.", "warning"); - // } const handleThemeSelect = (themeId, gradient) => { setCurrentThemeId(themeId); setColorTheme(gradient); @@ -100,82 +77,74 @@ function App() { }; useEffect(() => { - const timer = setTimeout(() => { - setShowWelcome(false); - }, 2500); + const timer = setTimeout(() => setShowWelcome(false), 2500); return () => clearTimeout(timer); }, []); return ( - - {showWelcome ? ( -
- -
- ) : ( - // WRAP EVERYTHING IN A FLEX CONTAINER -
- - - - - {/* ADD flex-1 TO MAIN CONTENT */} -
- - - } - /> - } - /> - -
- - {/* ADD FOOTER HERE */} -
- )} -
+ + {showWelcome ? ( +
+ +
+ ) : ( +
+ + + + + {/* MAIN CONTENT */} +
+ + + } + /> + } + /> + } /> + {/* ✅ Added Privacy Policy Route inside Routes */} + } /> + +
+ +
+ )} +
); } diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 0b37aeb..3b02b39 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -59,6 +59,28 @@ const Footer = ({ theme }) => { {t("footer.about")} + {/* ✅ Added Terms of Use link */} +
  • + + Terms of Use + +
  • + {/* ✅ Added Privacy Policy link */} +
  • + + Privacy Policy + +
  • diff --git a/src/components/PrivacyPolicy.jsx b/src/components/PrivacyPolicy.jsx new file mode 100644 index 0000000..34a2f4b --- /dev/null +++ b/src/components/PrivacyPolicy.jsx @@ -0,0 +1,166 @@ +import React from "react"; +import { Lock, Eye, Shield, CheckCircle, Calendar } from "lucide-react"; + +const PrivacyPolicy = () => { + const privacyCards = [ + { + id: 1, + icon: , + title: "Information We Collect", + content: "We may collect limited data like text input and preferences for improving user experience. No personal data is shared or sold.", + iconColor: "text-cyan-400" + }, + { + id: 2, + icon: , + title: "How We Protect Your Data", + content: "We implement industry-standard security measures to protect your information. Your data is encrypted and stored securely.", + iconColor: "text-purple-400" + }, + { + id: 3, + icon: , + title: "Your Consent", + content: "By using this app, you consent to this Privacy Policy. You have the right to access, modify, or delete your data at any time.", + iconColor: "text-green-400" + } + ]; + + return ( +
    +
    + {/* Header Section */} +
    +
    + +
    +

    + Privacy Policy +

    +

    + Your privacy is important to us. This Privacy Policy explains how we collect, use, and protect your personal information when you use WordWizard. +

    +
    + + {/* Grid Cards */} +
    + {privacyCards.map((card, index) => ( +
    +
    + {/* Icon */} +
    + {card.icon} +
    + +

    + {card.title} +

    + +

    + {card.content} +

    +
    +
    + ))} +
    + + {/* Additional Information Card */} +
    +

    Your Rights

    +
    +
    + +
    +

    Access Your Data

    +

    Request a copy of your personal information at any time.

    +
    +
    +
    + +
    +

    Data Deletion

    +

    Request deletion of your data from our systems.

    +
    +
    +
    + +
    +

    No Third-Party Sharing

    +

    We never sell or share your data with third parties.

    +
    +
    +
    + +
    +

    Transparent Practices

    +

    Clear communication about how we handle your information.

    +
    +
    +
    +
    + + {/* Footer Card */} +
    +
    + +
    +

    Last updated

    +

    {new Date().toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })}

    +
    +
    + + Contact Us + +
    +
    + + +
    + ); +}; + +export default PrivacyPolicy; \ No newline at end of file diff --git a/src/components/TermsOfUse.jsx b/src/components/TermsOfUse.jsx new file mode 100644 index 0000000..b5424dc --- /dev/null +++ b/src/components/TermsOfUse.jsx @@ -0,0 +1,130 @@ +import React from "react"; +import { Scale, Shield, FileText, RefreshCw, Mail } from "lucide-react"; + +const TermsOfUse = () => { + const termsCards = [ + { + id: 1, + icon: , + title: "Use of the Website", + content: "You may use this website for personal and non-commercial purposes only. Any misuse or attempt to disrupt the functionality of the site is strictly prohibited.", + iconColor: "text-cyan-400" + }, + { + id: 2, + icon: , + title: "Intellectual Property", + content: "All content, design, and code within WordWizard are protected by copyright. Unauthorized copying or redistribution is prohibited.", + iconColor: "text-purple-400" + }, + { + id: 3, + icon: , + title: "Disclaimer", + content: "The information provided on this site is for general purposes only. We do not guarantee the accuracy or reliability of any content.", + iconColor: "text-pink-400" + }, + { + id: 4, + icon: , + title: "Changes to Terms", + content: "We reserve the right to update these terms at any time. Please review this page periodically for changes.", + iconColor: "text-yellow-400" + } + ]; + + return ( +
    +
    + {/* Header Section */} +
    +

    + Terms of Use +

    +

    + Welcome to WordWizard. By accessing or using this website, you agree to comply with and be bound by the following terms and conditions. +

    +
    + + {/* Grid Cards */} +
    + {termsCards.map((card, index) => ( +
    +
    + {/* Icon */} +
    + {card.icon} +
    + +

    + {card.id}. {card.title} +

    + +

    + {card.content} +

    +
    +
    + ))} +
    + + {/* Contact Card */} +
    +
    + +
    +

    Get in Touch

    +

    + If you have any questions about these Terms, please contact us at +

    + + support@wordwizard.com + +
    +
    + + +
    + ); +}; + +export default TermsOfUse; \ No newline at end of file