chore: setup project for production
This commit is contained in:
39
components/privacy-policy/PrivacyPolicy.jsx
Normal file
39
components/privacy-policy/PrivacyPolicy.jsx
Normal file
@@ -0,0 +1,39 @@
|
||||
"use client";
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import './privacy.css'
|
||||
const PrivacyPolicy = () => {
|
||||
const [htmlContent, setHtmlContent] = useState("");
|
||||
const [loading,setLoading] = useState(false)
|
||||
const fetchdata = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const response = await fetch("/api/privacy-policy", {
|
||||
method: "GET",
|
||||
});
|
||||
|
||||
const resData = await response.json();
|
||||
setHtmlContent(resData.data);
|
||||
} catch (error) {
|
||||
console.error("Error fetching data:", error);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
fetchdata();
|
||||
}, []);
|
||||
return (
|
||||
<div className="privacy-policy-container">
|
||||
{loading ? (
|
||||
<div className="loading-message">Loading content, please wait...</div>
|
||||
) : htmlContent ? (
|
||||
<div dangerouslySetInnerHTML={{ __html: htmlContent }} />
|
||||
) : (
|
||||
<div className="no-content-message">No content available</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default PrivacyPolicy
|
||||
60
components/privacy-policy/privacy.css
Normal file
60
components/privacy-policy/privacy.css
Normal file
@@ -0,0 +1,60 @@
|
||||
/* Styles for the refund policy container */
|
||||
.privacy-policy-container {
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
max-width: 800px;
|
||||
line-height: 1.6;
|
||||
font-family: 'Arial', sans-serif;
|
||||
}
|
||||
|
||||
/* General headings */
|
||||
.privacy-policy-container h1 {
|
||||
font-size: 2.5rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.privacy-policy-container h2 {
|
||||
font-size: 1.75rem;
|
||||
font-weight: 600;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 15px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* Paragraph and text content */
|
||||
.privacy-policy-container p {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 15px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* Lists */
|
||||
.privacy-policy-container ul {
|
||||
padding-left: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.privacy-policy-container ul li {
|
||||
margin-bottom: 10px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
/* Additional spacing and margins */
|
||||
.privacy-policy-container .mt-5 {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.privacy-policy-container .mb-5 {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
/* Add borders or backgrounds as needed */
|
||||
.privacy-policy-container {
|
||||
background-color: #f9f9f9;
|
||||
border-radius: 10px;
|
||||
padding: 25px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user