fix: all content

This commit is contained in:
Sabda Yagra 2025-02-18 13:02:40 +07:00
parent c9cd4ce9d7
commit d2000a0166
6 changed files with 29 additions and 27 deletions

View File

@ -95,35 +95,35 @@ const ContactForm = () => {
}; };
return ( return (
<form method="POST" id="form" onSubmit={handleSubmit(onSubmit)} className="max-w-2xl mx-auto bg-white p-6"> <form method="POST" id="form" onSubmit={handleSubmit(onSubmit)} className="max-w-2xl mx-auto bg-white dark:bg-black p-6">
<Reveal> <Reveal>
{/* Header */} {/* Header */}
<div className="flex items-center justify-center mb-6"> <div className="flex items-center justify-center mb-6">
<img src="/assets/icons-contact.png" alt="contact" /> <img src="/assets/icons-contact.png" alt="contact" />
<h2 className="ml-4 text-2xl font-bold">{t("contactUs")}</h2> <h2 className="ml-4 text-2xl font-bold">{t("contactUs")}</h2>
</div> </div>
<h3 className="text-lg font-semibold text-gray-800 mb-1">{t("writeMessage")}</h3> <h3 className="text-lg font-semibold text-gray-800 dark:text-white mb-1">{t("writeMessage")}</h3>
<p className="text-sm text-gray-600 mb-6">{t("leaveMessage")}</p> <p className="text-sm text-gray-600 dark:text-white mb-6">{t("leaveMessage")}</p>
{/* Form */} {/* Form */}
<form> <form>
<div className="mb-4"> <div className="mb-4">
<label className="block text-sm font-medium text-gray-700 mb-1">{t("name")}</label> <label className="block text-sm font-medium text-gray-700 dark:text-white mb-1">{t("name")}</label>
<input type="text" placeholder={t("enterName")} className={`w-full p-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${errors.name ? "block" : ""}`} {...register("name")} required /> <input type="text" placeholder={t("enterName")} className={`w-full p-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${errors.name ? "block" : ""}`} {...register("name")} required />
</div> </div>
<div className="mb-4"> <div className="mb-4">
<label className="block text-sm font-medium text-gray-700 mb-1">Email</label> <label className="block text-sm font-medium text-gray-700 dark:text-white mb-1">Email</label>
<input type="email" placeholder="name@mail.com" className={`w-full p-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${errors.email ? "block" : ""}`} {...register("email")} required /> <input type="email" placeholder="name@mail.com" className={`w-full p-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${errors.email ? "block" : ""}`} {...register("email")} required />
</div> </div>
<div className="mb-4"> <div className="mb-4">
<label className="block text-sm font-medium text-gray-700 mb-1">{t("number")} (Optional)</label> <label className="block text-sm font-medium text-gray-700 dark:text-white mb-1">{t("number")} (Optional)</label>
<input type="text" placeholder={t("enterNumber")} className="w-full p-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" /> <input type="text" placeholder={t("enterNumber")} className="w-full p-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" />
</div> </div>
<div className="mb-4"> <div className="mb-4">
<label className="block text-sm font-medium text-gray-700 mb-1">{t("subject")}</label> <label className="block text-sm font-medium text-gray-700 dark:text-white mb-1">{t("subject")}</label>
<select <select
className={`w-full p-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${errors.subjects ? "block" : ""}`} className={`w-full p-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${errors.subjects ? "block" : ""}`}
{...register("subjects", { onChange: (e) => handleSubjects(e) })} {...register("subjects", { onChange: (e) => handleSubjects(e) })}
@ -144,7 +144,7 @@ const ContactForm = () => {
</div> </div>
<div className="mb-4"> <div className="mb-4">
<label className="block text-sm font-medium text-gray-700 mb-1">{t("messages")}</label> <label className="block text-sm font-medium text-gray-700 dark:text-white mb-1">{t("messages")}</label>
<textarea placeholder={t("writeYourMessage")} rows={4} className="w-full p-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea> <textarea placeholder={t("writeYourMessage")} rows={4} className="w-full p-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea>
</div> </div>

View File

@ -42,7 +42,7 @@ const FAQS: React.FC = () => {
<Reveal> <Reveal>
<div className="flex items-center justify-center mb-6"> <div className="flex items-center justify-center mb-6">
<img src="/assets/icons-faqs.png" alt="Faqs" /> <img src="/assets/icons-faqs.png" alt="Faqs" />
<h2 className="ml-4 text-lg lg:text-2xl font-bold text-gray-800">Frequently Asked Questions</h2> <h2 className="ml-4 text-lg lg:text-2xl font-bold text-gray-800 dark:text-white">Frequently Asked Questions</h2>
</div> </div>
{/* FAQS Items */} {/* FAQS Items */}
@ -50,10 +50,10 @@ const FAQS: React.FC = () => {
{faqs?.map((faq, index) => ( {faqs?.map((faq, index) => (
<div key={index} className="border-b border-gray-300 pb-2 cursor-pointer"> <div key={index} className="border-b border-gray-300 pb-2 cursor-pointer">
<div className="flex justify-between items-center" onClick={() => toggleFAQ(index)}> <div className="flex justify-between items-center" onClick={() => toggleFAQ(index)}>
<h3 className="text-sm font-semibold text-gray-800">{faq.question}</h3> <h3 className="text-sm font-semibold text-gray-800 dark:text-white">{faq.question}</h3>
<span className="text-gray-500 text-xl">{openIndex === index ? "" : "+"}</span> <span className="text-gray-500 dark:text-white text-xl">{openIndex === index ? "" : "+"}</span>
</div> </div>
{openIndex === index && <p className="text-gray-600 mt-2 text-sm">{faq.answer}</p>} {openIndex === index && <p className="text-gray-600 dark:text-white mt-2 text-sm">{faq.answer}</p>}
</div> </div>
))} ))}
</div> </div>

View File

@ -21,7 +21,7 @@ const Rating: React.FC<RatingProps> = ({ label, onRate }) => {
return ( return (
<div className="flex justify-between items-center mb-4"> <div className="flex justify-between items-center mb-4">
<span className="text-gray-800">{label}</span> <span className="text-gray-800 dark:text-white">{label}</span>
<div className="flex space-x-1"> <div className="flex space-x-1">
{[1, 2, 3, 4, 5].map((star) => ( {[1, 2, 3, 4, 5].map((star) => (
<button key={star} onClick={() => handleClick(star)} className={`text-2xl ${star <= selected ? "text-yellow-500" : "text-gray-300"}`}> <button key={star} onClick={() => handleClick(star)} className={`text-2xl ${star <= selected ? "text-yellow-500" : "text-gray-300"}`}>
@ -117,14 +117,16 @@ const FeedbackForm: React.FC = () => {
return ( return (
<Reveal> <Reveal>
<div className="max-w-6xl flex flex-col mx-auto p-4 lg:p-40 gap-5"> <div className="max-w-6xl flex flex-col mx-auto p-4 lg:p-40 gap-5 ">
<div className="flex items-center justify-center mb-6"> <div className="flex items-center justify-center mb-6">
<img src="/assets/icons-feedback.png" alt="Feedback" /> <img src="/assets/icons-feedback.png" alt="Feedback" />
<h2 className="ml-4 text-[15px] lg:text-[32px] font-bold text-gray-800">{t("userFeedback")}</h2> <h2 className="ml-4 text-[15px] lg:text-[32px] font-bold text-gray-800 dark:text-white">{t("userFeedback")}</h2>
</div>
<div className="text-black dark:text-white">
<Rating label={t("ratings")} onRate={(rating) => handleRatingChange("accessibility", rating)} />
<Rating label={t("ratings2")} onRate={(rating) => handleRatingChange("appearance", rating)} />
<Rating label={t("ratings3")} onRate={(rating) => handleRatingChange("content", rating)} />
</div> </div>
<Rating label={t("ratings")} onRate={(rating) => handleRatingChange("accessibility", rating)} />
<Rating label={t("ratings2")} onRate={(rating) => handleRatingChange("appearance", rating)} />
<Rating label={t("ratings3")} onRate={(rating) => handleRatingChange("content", rating)} />
<div className="flex justify-center"> <div className="flex justify-center">
<button onClick={handleSubmit} className="w-fit lg:w-32 bg-[#2F80ED] text-white py-2 px-4 gap-4 rounded-md hover:bg-blue-600 transition text-sm lg:text-base"> <button onClick={handleSubmit} className="w-fit lg:w-32 bg-[#2F80ED] text-white py-2 px-4 gap-4 rounded-md hover:bg-blue-600 transition text-sm lg:text-base">
{t("send")} {t("send")}

View File

@ -482,8 +482,8 @@ const page = () => {
if (category != undefined) { if (category != undefined) {
const resInstiution = await listInstitusi(category); const resInstiution = await listInstitusi(category);
const res = await listProvince(); const res = await listProvince();
setInstitution(resInstiution?.data.data); setInstitution(resInstiution?.data?.data);
setProvince(res?.data.data); setProvince(res?.data?.data);
} }
} }
@ -518,7 +518,7 @@ const page = () => {
</div> </div>
<form <form
className="flex-1 w-full bg-white" className="flex-1 w-full bg-white dark:bg-slate-600"
onSubmit={handleSubmit(onSubmit)} onSubmit={handleSubmit(onSubmit)}
style={ style={
Number(category) < 5 Number(category) < 5
@ -580,7 +580,7 @@ const page = () => {
: {} : {}
} }
> >
<p className="text-black text-2xl px-0 lg:px-20 font-semibold">{t("enterOTP")}</p> <p className="text-black dark:text-white text-2xl px-0 lg:px-20 font-semibold">{t("enterOTP")}</p>
<p className="text-red-500 text-sm px-0 lg:px-20">{t("checkInbox")}</p> <p className="text-red-500 text-sm px-0 lg:px-20">{t("checkInbox")}</p>
</div> </div>
</div> </div>
@ -600,7 +600,7 @@ const page = () => {
{t("member")} <span className="text-red-500">*</span> {t("member")} <span className="text-red-500">*</span>
</Label> </Label>
<select <select
className={`py-2 px-1 rounded-md border text-sm text-slate-400 border-slate-300 bg-white ${errors.association ? "block" : ""}`} className={`py-2 px-1 rounded-md border text-sm text-slate-400 border-slate-300 bg-white dark:bg-slate-600 ${errors.association ? "block" : ""}`}
{...register("association")} {...register("association")}
id="association" id="association"
onChange={(e) => setAssociation(e.target.value)} onChange={(e) => setAssociation(e.target.value)}
@ -753,7 +753,7 @@ const page = () => {
<Label className="mb-2"> <Label className="mb-2">
Email <span className="text-red-500">*</span> Email <span className="text-red-500">*</span>
</Label> </Label>
<Input type="email" autoComplete="off" className={`${errors.email ? "block" : ""}`} {...register("email")} placeholder="Masukan Email Anda" disabled /> <Input type="email" autoComplete="off" className={`${errors.email ? "block" : "text-white"}`} {...register("email")} placeholder="Masukan Email Anda" disabled />
<div className="text-red-500">{errors.email?.message}</div> <div className="text-red-500">{errors.email?.message}</div>
</div> </div>
</div> </div>
@ -781,7 +781,7 @@ const page = () => {
<option disabled selected> <option disabled selected>
{t("selectInst")} {t("selectInst")}
</option> </option>
{institution.map((row: any) => ( {institution?.map((row: any) => (
<option value={row.id} key={row.id}> <option value={row.id} key={row.id}>
{row?.name} {row?.name}
</option> </option>

View File

@ -60,7 +60,7 @@ const Footer = () => {
<img src="/assets/icon-privacy.png" alt="Privacy" /> <img src="/assets/icon-privacy.png" alt="Privacy" />
<p className="font-semibold text-lg">{t("privacy")}</p> <p className="font-semibold text-lg">{t("privacy")}</p>
</div> </div>
<div className="container text-black space-y-2">{parse(String(privacy))}</div> <div className="container text-black dark:text-white space-y-2">{parse(String(privacy))}</div>
</DialogContent> </DialogContent>
</Dialog> </Dialog>
</div> </div>

View File

@ -44,7 +44,7 @@ export default function NewsTicker() {
}, 7000); }, 7000);
return () => clearInterval(interval); return () => clearInterval(interval);
}, [article.length]); }, [article?.length]);
return ( return (
<div className="fixed bottom-0 z-50 flex flex-row h-[60px] gap-3 w-full justify-between dark:bg-stone-800 bg-gray-50"> <div className="fixed bottom-0 z-50 flex flex-row h-[60px] gap-3 w-full justify-between dark:bg-stone-800 bg-gray-50">