Skip to content

Commit

Permalink
Merge pull request #117 from 202306-NEA-DZ-FEW/116-fix-newsletter-font
Browse files Browse the repository at this point in the history
feat(project): fix newsletter font and "read more" button
  • Loading branch information
liliumorion committed Nov 25, 2023
2 parents 7e6aede + 49a148f commit d7c53f8
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 24 deletions.
2 changes: 1 addition & 1 deletion public/locales/en/addItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"descriptionPlaceHolder": "Add a description",
"imageLabel": "Image",
"imageRequired": "You need to provide an image",
"locationLabel": "Province",
"locationLabel": "Wilaya",
"locationRequired": "Location is required",
"listingType": "Listing type",
"itemTagRequired": "Item type is required",
Expand Down
6 changes: 2 additions & 4 deletions src/components/BlogCard/HorizontalCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ function HorizontalCard({ description, imageUrl, id, blogKey }) {
className='text-secondary font-bold flex items-center gap-2'
>
{t("common:buttons:readMore")}

{i18n.language !== "ar" ? (
<IoIosArrowDropright className='text-xl' />
) : null}
{i18n.language === "ar" ? (
) : (
<IoIosArrowDropleft className='text-xl' />
) : null}
)}
</Link>
</div>
</div>
Expand Down
5 changes: 2 additions & 3 deletions src/components/BlogCard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ function BlogCard({ id, imageUrl, blogKey }) {
{t("common:buttons:readMore")}
{i18n.language !== "ar" ? (
<IoIosArrowDropright className='text-xl' />
) : null}
{i18n.language === "ar" ? (
) : (
<IoIosArrowDropleft className='text-xl' />
) : null}
)}
</Link>
</div>
</div>
Expand Down
9 changes: 6 additions & 3 deletions src/components/BlogsCard/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Image from "next/image";
import Link from "next/link";
import { useTranslation } from "next-i18next";
import { IoIosArrowDropright } from "react-icons/io";
import { IoIosArrowDropleft, IoIosArrowDropright } from "react-icons/io";

export default function BlogsCard({
title,
Expand Down Expand Up @@ -47,8 +47,11 @@ export default function BlogsCard({
className='text-secondary font-bold flex items-center gap-2'
>
{t("common:buttons:readMore")}

<IoIosArrowDropright className='text-xl' />
{i18n.language !== "ar" ? (
<IoIosArrowDropright className='text-xl' />
) : (
<IoIosArrowDropleft className='text-xl' />
)}
</Link>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ exports[`renders correctly 1`] = `
</div>
<div
className="col-span-1 "
dir="ltr"
>
<ul
className="flex flex-col items-center md:items-start gap-4"
Expand Down Expand Up @@ -194,6 +195,7 @@ exports[`renders correctly 1`] = `
</div>
<div
className="col-span-1"
dir="ltr"
>
<ul
className="flex flex-col items-center md:items-start"
Expand Down
12 changes: 9 additions & 3 deletions src/components/Footer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { FaInstagram } from "react-icons/fa";
import LanguageMenu from "../LanguageMenu";

function Footer() {
const { t } = useTranslation();
const { i18n, t } = useTranslation();
const router = useRouter();
const [currentPath, setCurrentPath] = useState("/");
useEffect(() => {
Expand All @@ -29,7 +29,10 @@ function Footer() {
</h2>
</Link>
</div>
<div className='col-span-1 '>
<div
dir={i18n?.language === "ar" ? "rtl" : "ltr"}
className='col-span-1 '
>
<ul className='flex flex-col items-center md:items-start gap-4'>
<Link href='/about'>
<li className='hover:underline'>{t("common:buttons:about")}</li>
Expand Down Expand Up @@ -63,7 +66,10 @@ function Footer() {
</div>
</ul>
</div>
<div className='col-span-1'>
<div
dir={i18n?.language === "ar" ? "rtl" : "ltr"}
className='col-span-1'
>
<ul className='flex flex-col items-center md:items-start'>
<li className=''>{t("common:footer:address")}</li>
<li className=''>{t("common:footer:street")}</li>
Expand Down
5 changes: 2 additions & 3 deletions src/components/LandingPage/BlogsSection/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ function BlogsSection({ blogs }) {
{t("common:buttons:readMore")}
{i18n.language !== "ar" ? (
<IoIosArrowDropright className='text-xl' />
) : null}
{i18n.language === "ar" ? (
) : (
<IoIosArrowDropleft className='text-xl' />
) : null}
)}
</Link>
</motion.div>
{/* Cards Section */}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Newsletter/NewsletterForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function NewsletterForm({ onValidated }) {
<h2 className='text-2xl md:text-3xl tracking-wider font-extrabold '>
{t("newsletter:newsletterTitle")}
</h2>
<p className='my-4 max-w-xl font-light text-xl text-gray-800'>
<p className='my-4 max-w-xl font-light text-xl'>
{t("newsletter:newsletterDescription")}
<br />
{t("newsletter:newsletterJoin")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Array [
newsletterTitle
</h2>
<p
className="my-4 max-w-xl font-light text-xl text-gray-800"
className="my-4 max-w-xl font-light text-xl"
>
newsletterDescription
<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Array [
newsletterTitle
</h2>
<p
className="my-4 max-w-xl font-light text-xl text-gray-800"
className="my-4 max-w-xl font-light text-xl"
>
newsletterDescription
<br />
Expand Down
8 changes: 4 additions & 4 deletions src/context/AuthProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function AuthContextProvider({ children }) {
date: serverTimestamp(),
});
setUser(user.user);
toast.success(`Hi ${userInfo.name}, Thank you for joing in us! 😍`, {
toast.success(`Hi ${userInfo.name}, Thank you for joining us! 😍`, {
position: toast.POSITION.TOP_CENTER,
autoClose: 1500,
});
Expand Down Expand Up @@ -144,7 +144,7 @@ export function AuthContextProvider({ children }) {
});
setUser(user);
toast.success(
`Hi ${user.user.displayName}, Thank you for joing in us! 😍`,
`Hi ${user.user.displayName}, Thank you for joining us! 😍`,
{
position: toast.POSITION.TOP_CENTER,
autoClose: 1500,
Expand Down Expand Up @@ -208,7 +208,7 @@ export function AuthContextProvider({ children }) {
});
setUser(user);
toast.success(
`Hi ${user.user.displayName}, Thank you for joing in us! 😍`,
`Hi ${user.user.displayName}, Thank you for joining us! 😍`,
{
position: toast.POSITION.TOP_CENTER,
autoClose: 1500,
Expand Down Expand Up @@ -273,7 +273,7 @@ export function AuthContextProvider({ children }) {
});
setUser(user);
toast.success(
`Hi ${user.user.displayName}, Thank you for joing in us! 😍`,
`Hi ${user.user.displayName}, Thank you for joining us! 😍`,
{
position: toast.POSITION.TOP_CENTER,
autoClose: 1500,
Expand Down

0 comments on commit d7c53f8

Please sign in to comment.