fix message, add privacy policy

This commit is contained in:
Vlad committed 2024-10-12 18:04:14 +06:00
1 parent db5a733752
commit 40d8d21b3e
8 files changed
+330 -12

No files matched your search

+2
View File
@@ -28,6 +28,7 @@ export default function Contacts() {
const {
register,
handleSubmit,
reset,
formState: { errors, isSubmitting },
} = useForm<FormFields>({
resolver: zodResolver(appealFormScheme),
@@ -41,6 +42,7 @@ export default function Contacts() {
const response = await apiInstance.post("/appeal_response/", data);
console.log(response);
toast.success(t("successMessage"));
reset();
} catch (error) {
if (error instanceof AxiosError) {
if (
+88
View File
@@ -0,0 +1,88 @@
import "./privacy.css";
import { useTranslations } from "next-intl";
const PrivacyPolicy = () => {
const t = useTranslations("privacyPolicy");
const formattedText1 = t("text1").replace(
"https://jmd.kg/",
"<a href='https://jmd.kg/' target='_blank' rel='noopener noreferrer'>https://jmd.kg/</a>"
);
return (
<div className='about container'>
{/*
<div className='about__image'>
<img src={MainImage} alt="main" />
</div>*/}
<div className='about__info'>
<div>
<h1>{t("text1h1")}</h1>
</div>
<div>
<h2>{t("text1h2")}</h2>
<p dangerouslySetInnerHTML={{ __html: formattedText1 }} />
</div>
<div>
<h2>{t("text2h2")}</h2>
<p>{t("text2")}</p>
</div>
<div>
<h2>{t("text3h2")}</h2>
<p>{t("text3")}</p>
</div>
<div>
<h2>{t("text4h2")}</h2>
<p>{t("text4")}</p>
</div>
<div>
<h2>{t("text5h2")}</h2>
<p>{t("text5")}</p>
</div>
<div>
<h2>{t("text6h2")}</h2>
<p>{t("text6")}</p>
</div>
<div>
<h2>{t("text7h2")}</h2>
<p>{t("text7")}</p>
</div>
<div>
<h2>{t("text8h2")}</h2>
<p>{t("text8")}</p>
</div>
<div>
<h2>{t("text9h2")}</h2>
<p>{t("text9")}</p>
</div>
<div>
<h2>{t("text10h2")}</h2>
<p>{t("text10")}</p>
</div>
<div>
<h2>{t("text11h2")}</h2>
<p>{t("text11")}</p>
</div>
<div>
<h2>{t("text12h2")}</h2>
<p>{t("text12")}</p>
</div>
<div>
<h2>{t("text13h2")}</h2>
<p>{t("text13")}</p>
</div>
</div>
<br />
</div>
)
}
export default PrivacyPolicy
+118
View File
@@ -0,0 +1,118 @@
.about {
margin-top: 6.25rem;
font-size: 1.125rem;
}
@media screen and (max-width: 768px) {
.about {
margin-top: 5rem;
}
}
.about__image img {
width: 90vw;
margin-bottom: 4.3rem;
}
.about__info {
display: flex;
flex-direction: column;
gap: 3rem;
padding-left: 5rem;
}
.about__info h1 {
font-size: 2rem;
font-weight: 700;
}
.about__info h2 {
font-size: 1.5rem;
font-weight: 600;
}
.about__info p {
font-size: 1rem;
line-height: 1.5;
}
.about__info a {
color: blue;
text-decoration: underline;
}
.about__info a:hover {
color: darkblue;
text-decoration: underline;
}
.about__questions {
margin: 7.2rem 0;
}
.about__questions h3 {
font-size: 1.875rem;
font-weight: 600;
line-height: 2.3rem;
}
@media screen and (max-width: 768px) {
.about__questions h3 {
text-align: center;
}
}
.about__blocks {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.about__block {
display: flex;
flex-direction: column;
gap: 1.2rem;
}
.about__block .about__item {
box-shadow: 0px 1px 4px 0px #E3EBFC;
padding: 1.75rem 1.5rem;
border-radius: 15px;
width: 40vw;
}
@media screen and (max-width: 768px) {
.about__block .about__item {
width: 80vw;
}
}
@media screen and (max-width: 425px) {
.about__block .about__item {
align-items: center;
padding: 1rem;
}
}
.about__block .about__item details summary {
display: flex;
align-items: center;
}
.about__block .about__item details summary img {
margin-left: 5rem;
}
@media screen and (max-width: 425px) {
.about__block .about__item details summary img {
margin-left: 1rem;
}
}
.about__block .about__item details p {
width: 487px;
height: 122px;
}
+13
View File
@@ -12,3 +12,16 @@ export const LINKS = () => {
return LINKS;
};
export const FOOTER_LINKS = () => {
const t = useTranslations("navigation");
const FOOTER_LINKS = [
{ id: 1, pagename: t("home"), pathname: "/" },
{ id: 2, pagename: t("news"), pathname: "/news" },
{ id: 3, pagename: t("tenders"), pathname: "/tenders" },
{ id: 4, pagename: t("contacts"), pathname: "/contacts" },
{ id: 5, pagename: t("privacy"), pathname: "/privacy" },
];
return FOOTER_LINKS;
};
+13 -6
View File
@@ -6,7 +6,7 @@ import app_store_btn from "./assets/app-store-btn.svg";
import play_market_btn from "./assets/play-market-btn.svg";
import { Link } from "@/shared/config/navigation";
import { useTranslations } from "next-intl";
import { LINKS } from "@/shared/variables/links";
import { FOOTER_LINKS } from "@/shared/variables/links";
const Footer = () => {
const t = useTranslations("general");
@@ -23,7 +23,7 @@ const Footer = () => {
{t("navigation")}
</h4>
<ul className="flex flex-col gap-6">
{LINKS().map((link) => (
{FOOTER_LINKS().map((link) => (
<li
className="h-fit flex justify-start text-base text-[#e2e8f0] font-normal leading-[140%] items-center gap-4"
key={link.id}
@@ -50,16 +50,23 @@ const Footer = () => {
</li>
<li className="h-fit flex justify-start text-base text-[#e2e8f0] font-normal leading-[140%] items-center gap-4">
{[youtube, facebook, instagram].map((net, i) => (
{[
{ src: youtube, href: "https://www.youtube.com/@TransparencyKyrgyzstan", alt: "YouTube" },
{ src: facebook, href: "https://www.facebook.com/tikyrgyzstan", alt: "Facebook" },
{ src: instagram, href: "https://www.instagram.com/transparencyinternational_kg?igsh=cTc2MHEwOW5vNDh2", alt: "Instagram" }
].map((net, i) => (
<Link
key={i}
href="#"
className="h-fit text-white flex justify-start text-base "
href={net.href}
className="h-fit text-white flex justify-start text-base"
target="_blank"
rel="noopener noreferrer"
>
<Image src={net} alt="Net Icon" key={net} />
<Image src={net.src} alt={net.alt} />
</Link>
))}
</li>
</ul>
</div>