Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions apps/comments-ui/src/components/content/forms/SortingForm.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import React, {useEffect, useRef, useState} from 'react';
import {ReactComponent as ChevronIcon} from '../../../images/icons/chevron-down.svg';
import {useOrderChange} from '../../../AppContext';
import {useAppContext, useOrderChange} from '../../../AppContext';

export const SortingForm: React.FC = () => {
const {t} = useAppContext();
const changeOrder = useOrderChange();
const [isOpen, setIsOpen] = useState(false);
const [selectedOption, setSelectedOption] = useState('count__likes desc, created_at desc');
const dropdownRef = useRef<HTMLDivElement>(null);

const options = [
{value: 'count__likes desc, created_at desc', label: 'Best'},
{value: 'created_at desc', label: 'Newest'},
{value: 'created_at asc', label: 'Oldest'}
{value: 'count__likes desc, created_at desc', label: t('Best')},
{value: 'created_at desc', label: t('Newest')},
{value: 'created_at asc', label: t('Oldest')}
];

const handleOptionClick = (value: string) => {
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/af/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "Word 'n lid van {{publication}} om kommentaar te lewer.",
"Become a paid member of {{publication}} to start commenting.": "Word 'n betaalde lid van {{publication}} om kommentaar te lewer.",
"Best": "",
"Cancel": "Kanselleer",
"Comment": "Kommentaar",
"Complete your profile": "Voltooi jou profiel",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Lidmaat bespreking",
"Name": "Naam",
"Neurosurgeon": "Neurochirurg",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "Een uur gelede",
"One min ago": "Een minuut gelede",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/ar/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "يجب أن تصبح عضوًا فى {{publication}} لتستطيع التعليق",
"Become a paid member of {{publication}} to start commenting.": "يجب ان تكون عضويتك مدفوعة فى {{publication}} لكي تستطيع التعليق",
"Best": "",
"Cancel": "إلغاء",
"Comment": "تعليق",
"Complete your profile": "إكمال ملفك الشخصى",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "مناقشة الاعضاء",
"Name": "الاسم",
"Neurosurgeon": "جراح المخ و الاعصاب",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "منذ ساعة واحدة",
"One min ago": " منذ دقيقة واحدة",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/bg/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "Убедени ли сте?",
"Become a member of {{publication}} to start commenting.": "Абонирайте се за {{publication}}, за да коментирате.",
"Become a paid member of {{publication}} to start commenting.": "Станете плащащ абонат на {{publication}}, за да коментирате.",
"Best": "",
"Cancel": "Отказ",
"Comment": "Коментар",
"Complete your profile": "Попълнете профила си",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Дискусия за абонатите",
"Name": "Име",
"Neurosurgeon": "Неврохирург",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "Веднъж изтрит, коментарът не може да бъде възстановен.",
"One hour ago": "Преди час",
"One min ago": "Преди минута",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/bn/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "{{publication}} এর সদস্য হন মন্তব্য করার জন্য।",
"Become a paid member of {{publication}} to start commenting.": "{{publication}} এর পেইড সদস্য হন মন্তব্য করার জন্য।",
"Best": "",
"Cancel": "বাতিল করুন",
"Comment": "মন্তব্য",
"Complete your profile": "আপনার প্রোফাইল সম্পূর্ণ করুন",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "সদস্য আলোচনা",
"Name": "নাম",
"Neurosurgeon": "নিউরোসার্জন",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "এক ঘণ্টা পূর্বে",
"One min ago": "",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/bs/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "Postani član portala {{publication}} za pristup diskusiji.",
"Become a paid member of {{publication}} to start commenting.": "Postani plaćeni član portala {{publication}} za pristup diskusiji.",
"Best": "",
"Cancel": "Otkaži",
"Comment": "Komentar",
"Complete your profile": "Dovrši svoj profil",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Diskusija članova",
"Name": "Ime",
"Neurosurgeon": "Neurohirurg",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "Prije jedan sat",
"One min ago": "Prije jedan minut",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/ca/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "N'estàs segur?",
"Become a member of {{publication}} to start commenting.": "Fes-te membre de {{publication}} per començar a comentar.",
"Become a paid member of {{publication}} to start commenting.": "Fes-te membre de pagament de {{publication}} per començar a comentar",
"Best": "",
"Cancel": "Cancel·la",
"Comment": "Comentari",
"Complete your profile": "Completa el teu perfil",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Debat de membres",
"Name": "Nom",
"Neurosurgeon": "Neurocirurgià",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "Un cop esborrat, aquest comentari no es pot recuperar",
"One hour ago": "Fa una hora",
"One min ago": "Fa un minut",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"Become a member of {{publication}} to start commenting.": "A call to action letting people know they need to sign up before commenting",
"Become a paid member of {site} to get access to all premium content.": "",
"Become a paid member of {{publication}} to start commenting.": "A call to action letting people know they need to become paid members before commenting",
"Best": "",
"Billing info": "A label for the user billing information section",
"Black Friday": "An example offer name",
"By {authors}": "Newsletter header text",
Expand Down Expand Up @@ -153,12 +154,14 @@
"Name": "A label to indicate a member's name",
"Need more help? Contact support": "A link to contact support",
"Neurosurgeon": "Example of an expertise of a person used in comments when editing your expertise",
"Newest": "",
"Newsletters can be disabled on your account for two reasons: A previous email was marked as spam, or attempting to send an email resulted in a permanent failure (bounce).": "A paragraph in the email suppression FAQ",
"No matches found": "Shown in search when 0 results",
"No member exists with this e-mail address.": "Shown when trying to sign in.",
"No member exists with this e-mail address. Please sign up first.": "Shown when trying to sign in.",
"Not receiving emails?": "A link in portal to take members to an FAQ area about what to do if you're not receiving emails",
"Now check your email!": "A confirmation message after logging in or signing up",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "Warning message before deleting a comment",
"Once resubscribed, if you still don't see emails in your inbox, check your spam folder. Some inbox providers keep a record of previous spam complaints and will continue to flag emails. If this happens, mark the latest newsletter as 'Not spam' to move it back to your primary inbox.": "A paragraph in the email suppression FAQ",
"One hour ago": "Time a comment was placed",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/cs/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "Staňte se členem {{publication}}, abyste mohli začít komentovat.",
"Become a paid member of {{publication}} to start commenting.": "Staňte se placeným členem {{publication}}, abyste mohli začít komentovat.",
"Best": "",
"Cancel": "Zrušit",
"Comment": "Komentář",
"Complete your profile": "Dokončete svůj profil",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Diskuse členů",
"Name": "Jméno",
"Neurosurgeon": "Neurochirurg",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "Před jednou hodinou",
"One min ago": "Před jednou minutou",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/da/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "Er du sikker?",
"Become a member of {{publication}} to start commenting.": "Bliv medlem af {{publication}} for at kunne skrive kommentarer.",
"Become a paid member of {{publication}} to start commenting.": "Bliv betalende medlem af {{publication}} for at kunne skrive kommentarer.",
"Best": "",
"Cancel": "Annuller",
"Comment": "Kommentér",
"Complete your profile": "Færdiggør din profil",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Medlemsdiskussion",
"Name": "Navn",
"Neurosurgeon": "Neurokirurg",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "Når den først er slettet, kan denne kommentar ikke gendannes.",
"One hour ago": "En time siden",
"One min ago": "Et minut siden",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/de-CH/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "Sind Sie sicher?",
"Become a member of {{publication}} to start commenting.": "Werden Sie ein Mitglied bei {{publication}}, um Kommentare zu schreiben.",
"Become a paid member of {{publication}} to start commenting.": "Werden Sie ein zahlendes Mitglied bei {{publication}}, um Kommentare zu schreiben.",
"Best": "",
"Cancel": "Abbrechen",
"Comment": "Kommentar",
"Complete your profile": "Vervollständigen Sie Ihr Profil",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Mitgliederdiskussion",
"Name": "Name",
"Neurosurgeon": "Neurochirurg",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "Der Kommentar kann nicht wiederhergestellt werden, wenn er gelöscht wurde.",
"One hour ago": "Vor einer Stunde",
"One min ago": "Vor einer Minute",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/de/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "Bist du sicher?",
"Become a member of {{publication}} to start commenting.": "Werde Mitglied bei {{publication}}, um Kommentare zu schreiben.",
"Become a paid member of {{publication}} to start commenting.": "Werde zahlendes Mitglied bei {{publication}}, um Kommentare zu schreiben.",
"Best": "Beste",
"Cancel": "Abbrechen",
"Comment": "Kommentar",
"Complete your profile": "Vervollständige dein Profil",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Mitgliederdiskussion",
"Name": "Name",
"Neurosurgeon": "Neurochirurg",
"Newest": "Neuste",
"Oldest": "Älteste",
"Once deleted, this comment can’t be recovered.": "Der Kommentar kann nicht wiederhergestellt werden, sobald er gelöscht wurde.",
"One hour ago": "Vor einer Stunde",
"One min ago": "Vor einer Minute",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/el/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "Γίνετε μέλος του {{publication}} για να ξεκινήσετε να σχολιάζετε.",
"Become a paid member of {{publication}} to start commenting.": "Γίνετε premium μέλος του {{publication}} για να ξεκινήσετε να σχολιάζετε.",
"Best": "",
"Cancel": "Ακύρωση",
"Comment": "Σχόλιο",
"Complete your profile": "Ολοκληρώστε το προφίλ σας",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Συζήτηση μελών",
"Name": "Όνομα",
"Neurosurgeon": "Νευροχειρουργός",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "Πριν από μία ώρα",
"One min ago": "Πριν από ένα λεπτό",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/en/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "",
"Become a paid member of {{publication}} to start commenting.": "",
"Best": "",
"Cancel": "",
"Comment": "",
"Complete your profile": "",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "",
"Name": "",
"Neurosurgeon": "",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "",
"One min ago": "",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/eo/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "",
"Become a paid member of {{publication}} to start commenting.": "",
"Best": "",
"Cancel": "",
"Comment": "",
"Complete your profile": "",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "",
"Name": "",
"Neurosurgeon": "",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "",
"One min ago": "",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/es/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "Hazte miembro de {{publication}} para poder comentar.",
"Become a paid member of {{publication}} to start commenting.": "Hazte miembro de pago para poder comentar en {{publication}}.",
"Best": "",
"Cancel": "Cancelar",
"Comment": "Comentar",
"Complete your profile": "Completa tu perfil",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Discusión de miembros",
"Name": "Nombre",
"Neurosurgeon": "Neurocirujano",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "Hace una hora",
"One min ago": "Hace un minuto",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/et/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "Kommenteerimise alustamiseks saage {{publication}} liikmeks.",
"Become a paid member of {{publication}} to start commenting.": "Kommenteerimise alustamiseks saage {{publication}} tasuliseks liikmeks.",
"Best": "",
"Cancel": "Tühista",
"Comment": "Kommentaar",
"Complete your profile": "Täida oma profiil",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Liikmete arutelu",
"Name": "Nimi",
"Neurosurgeon": "Neurokirurg",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "Üks tund tagasi",
"One min ago": "Üks minut tagasi",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/fa/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "عضو وب\u200cسایت {{publication}} شوید تا مجوز ارسال دیدگاه دریافت کنید.",
"Become a paid member of {{publication}} to start commenting.": "حق اشتراک وب\u200cسایت {{publication}} را پرداخت کنید تا مجوز ارسال دیدگاه دریافت کنید.",
"Best": "",
"Cancel": "انصراف",
"Comment": "دیدگاه",
"Complete your profile": "نمایه خود را کامل کنید",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "گفتمان کاربران",
"Name": "نام",
"Neurosurgeon": "جراح مغز و اعصاب",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "یک ساعت پیش",
"One min ago": "یک دقیقه پیش",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/fi/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "Ala {{publication}} jäseneksi pystyäksesi kommentoimaan",
"Become a paid member of {{publication}} to start commenting.": "Ota maksullinen jäsenyys sivulle {{publication}}, jotta pystyt kommentoimaan",
"Best": "",
"Cancel": "Peruuta",
"Comment": "Kommentti",
"Complete your profile": "Täydennä profiilisi",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Jäsenten keskustelu",
"Name": "Nimi",
"Neurosurgeon": "Neurokirurgi",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "Tunti sitten",
"One min ago": "Minuutti sitten",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/fr/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "Abonnez-vous gratuitement à {{publication}} pour commencer à commenter.",
"Become a paid member of {{publication}} to start commenting.": "Choisissez un abonnement payant à {{publication}} pour commencer à commenter.",
"Best": "",
"Cancel": "Annuler",
"Comment": "Commentaire",
"Complete your profile": "Complétez votre profil",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Discussion entre abonnés",
"Name": "Nom",
"Neurosurgeon": "Neurochirurgien",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "Il y a une heure",
"One min ago": "Il y a une minute",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/gd/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "A bheil thu cinnteach?",
"Become a member of {{publication}} to start commenting.": "Clàraich nad bhall an làrach-lìn, {{publication}}, gus beachd fhàgail air.",
"Become a paid member of {{publication}} to start commenting.": "Clàraich nad bhall phrìomhach an làrach-lìn, {{publication}}, gus beachd fhàgail air.",
"Best": "",
"Cancel": "Sguir dheth",
"Comment": "Beachd",
"Complete your profile": "Lìon a-steach a' phròifil agad",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "Deasbad",
"Name": "Ainm",
"Neurosurgeon": "Niùro-làmh-lèigh",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "Cha ghabh a aiseag an dèidh sguabadh às",
"One hour ago": "O chionn uair a thìde",
"One min ago": "O chionn mionaid",
Expand Down
3 changes: 3 additions & 0 deletions ghost/i18n/locales/he/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Are you sure?": "",
"Become a member of {{publication}} to start commenting.": "הירשמו כחברי {{publication}} כדי להתחיל להגיב.",
"Become a paid member of {{publication}} to start commenting.": "הירשמו כחברי משלמים של {{publication}} כדי להתחיל להגיב.",
"Best": "",
"Cancel": "ביטול",
"Comment": "תגובה",
"Complete your profile": "השלימו את הפרופיל שלכם",
Expand Down Expand Up @@ -40,6 +41,8 @@
"Member discussion": "דיון חברים רשומים",
"Name": "שם",
"Neurosurgeon": "נוֹיְרוֹכִירוּרְג",
"Newest": "",
"Oldest": "",
"Once deleted, this comment can’t be recovered.": "",
"One hour ago": "לפני שעה",
"One min ago": "לפני דקה",
Expand Down
Loading