Skip to content

Commit

Permalink
Merge branch 'testing'
Browse files Browse the repository at this point in the history
  • Loading branch information
osamasayed committed Nov 18, 2024
2 parents ec5835c + 4d75fbc commit 3e7f9c0
Show file tree
Hide file tree
Showing 103 changed files with 15 additions and 31 deletions.
2 changes: 1 addition & 1 deletion configs/SecurityHeaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
const ContentSecurityPolicy = `
default-src 'self' *.qurancdn.com cdn.plaid.com;
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://www.google-analytics.com https://ssl.google-analytics.com https://vitals.vercel-insights.com https://www.givingloop.org https://code.jquery.com https://www.google.com https://js.stripe.com https://ipinfo.io https://snap.licdn.com https://cdn.mouseflow.com https://www.paypal.com https://wchat.eu.freshchat.com https://cdn.plaid.com https://cdnjs.cloudflare.com https://cdn.amplitude.com https://cdn.logrocket.io https://www.gstatic.com https://js.stripe.com;
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://www.google-analytics.com https://ssl.google-analytics.com https://vitals.vercel-insights.com https://www.givingloop.org https://code.jquery.com https://www.google.com https://js.stripe.com https://ipinfo.io https://snap.licdn.com https://cdn.mouseflow.com https://www.paypal.com https://wchat.eu.freshchat.com https://cdn.plaid.com https://cdnjs.cloudflare.com https://cdn.amplitude.com https://cdn.logrocket.io https://www.gstatic.com https://js.stripe.com https://www.clarity.ms;
font-src 'self' 'unsafe-inline' 'unsafe-eval' givingloop.org fonts.gstatic.com https://www.givingloop.org;
frame-src 'self' 'unsafe-inline' 'unsafe-eval' https://js.stripe.com/v3 js.stripe.com https://www.paypal.com www.paypal.com https://wchat.eu.freshchat.com https://www.google.com www.google.com www.youtube.com;
style-src 'self' 'unsafe-inline' 'unsafe-eval' *.givingloop.org givingloop.org fonts.googleapis.com fonts.googleapis.com wchat.eu.freshchat.com;
Expand Down
Binary file modified public/fonts/quran/hafs/v1/ttf/p175.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v1/woff/p175.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v1/woff2/p175.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/ttf/p293.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/ttf/p329.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/ttf/p354.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/ttf/p36.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/ttf/p372.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/ttf/p58.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/ttf/p597.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/ttf/p61.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff/p293.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff/p329.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff/p354.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff/p36.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff/p372.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff/p58.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff/p597.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff/p61.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff2/p293.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff2/p329.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff2/p354.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff2/p36.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff2/p372.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff2/p58.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff2/p597.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/colrv1/woff2/p61.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/ttf/p293.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/ttf/p329.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/ttf/p354.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/ttf/p36.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/ttf/p372.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/ttf/p58.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/ttf/p597.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/ttf/p61.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff/p293.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff/p329.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff/p354.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff/p36.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff/p372.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff/p58.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff/p597.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff/p61.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff2/p293.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff2/p329.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff2/p354.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff2/p36.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff2/p372.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff2/p58.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff2/p597.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/dark/woff2/p61.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/ttf/p293.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/ttf/p329.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/ttf/p354.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/ttf/p36.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/ttf/p372.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/ttf/p58.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/ttf/p597.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/ttf/p61.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff/p293.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff/p329.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff/p354.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff/p36.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff/p372.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff/p58.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff/p597.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff/p61.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff2/p293.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff2/p329.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff2/p354.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff2/p36.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff2/p372.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff2/p58.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff2/p597.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/light/woff2/p61.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/ttf/p293.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/ttf/p329.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/ttf/p354.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/ttf/p36.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/ttf/p372.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/ttf/p58.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/ttf/p597.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/ttf/p61.ttf
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff/p293.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff/p329.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff/p354.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff/p36.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff/p372.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff/p58.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff/p597.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff/p61.woff
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff2/p293.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff2/p329.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff2/p354.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff2/p36.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff2/p372.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff2/p58.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff2/p597.woff2
Binary file not shown.
Binary file modified public/fonts/quran/hafs/v4/ot-svg/sepia/woff2/p61.woff2
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ const EditorsDetails: React.FC<Props> = ({ editors }) => {
let displayNames;
if (editorNames.length === 1) {
displayNames = editorNames[0];
} else if (editorNames.length === 2) {
displayNames = `${editorNames[0]} ${t('and')} ${editorNames[1]}`;
} else if (editorNames.length >= 3) {
displayNames = `${editorNames[0]}, ${editorNames[1]} ${t('and')} ${editorNames[2]}`;
} else if (editorNames.length >= 2) {
// Take all names except the last one and join them with commas
const namesExceptLast = editorNames.slice(0, -1).join(', ');
// Add the last name with 'and'
displayNames = `${namesExceptLast} ${t('and')} ${editorNames[editorNames.length - 1]}`;
}
return <span>{displayNames}</span>;
};
Expand Down
13 changes: 9 additions & 4 deletions src/components/Navbar/SettingsDrawer/TranslationSection.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable max-lines */
import { useCallback, useMemo } from 'react';

import { Action } from '@reduxjs/toolkit';
Expand Down Expand Up @@ -67,19 +68,23 @@ const TranslationSection = () => {

const renderTranslations = useCallback(
(data: TranslationsResponse) => {
const availableTranslations = selectedTranslations.filter((selectedId) =>
data.translations.some((translation) => translation.id === selectedId),
);

const firstSelectedTranslation = data.translations.find(
(translation) => translation.id === selectedTranslations[0],
(translation) => translation.id === availableTranslations[0],
);

let selectedValueString = t('settings.no-translation-selected');
if (selectedTranslations.length === 1) selectedValueString = firstSelectedTranslation?.name;
if (selectedTranslations.length === 2) {
if (availableTranslations.length === 1) selectedValueString = firstSelectedTranslation?.name;
if (availableTranslations.length === 2) {
selectedValueString = t('settings.value-and-other', {
value: firstSelectedTranslation?.name,
othersCount: localizedSelectedTranslations,
});
}
if (selectedTranslations.length > 2) {
if (availableTranslations.length > 2) {
selectedValueString = t('settings.value-and-others', {
value: firstSelectedTranslation?.name,
othersCount: localizedSelectedTranslations,
Expand Down
22 changes: 0 additions & 22 deletions src/components/dls/Footer/TitleAndDescription.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
import Trans from 'next-translate/Trans';
import useTranslation from 'next-translate/useTranslation';

import styles from './Footer.module.scss';

import Link, { LinkVariant } from '@/dls/Link/Link';
import QuranTextLogo from '@/icons/quran-text-logo.svg';
import { logButtonClick } from '@/utils/eventLogger';

const TitleAndDescription = () => {
const { t } = useTranslation('common');

const onHiringAnnouncementClicked = () => {
logButtonClick('footer_hiring_announcement');
};

return (
<div className={styles.titleAndDescriptionContainer}>
<div className={styles.headingContainer}>
Expand All @@ -23,21 +16,6 @@ const TitleAndDescription = () => {
<div className={styles.title}>{t('footer.title')}</div>
</div>
<p className={styles.description}>{t('footer.description')}</p>
<div className={styles.hiringAnnouncementContainer}>
<Trans
components={{
link: (
<Link
href="https://www.quran.foundation/careers"
variant={LinkVariant.Blend}
onClick={onHiringAnnouncementClicked}
isNewTab
/>
),
}}
i18nKey="common:footer.hiring"
/>
</div>
</div>
);
};
Expand Down

0 comments on commit 3e7f9c0

Please sign in to comment.