Skip to content

Commit

Permalink
Setup new endpoint for featured groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppetm committed Oct 21, 2023
1 parent 05604bd commit 97c9d7d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
9 changes: 9 additions & 0 deletions components/Groups/UniversityGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ const AdditionalGroup = (props: Props) => {
bgColor={theme.palette.neutralLight}
className="m-1"
/>
{group.user_count && <Chip
label={`${group.user_count} ${locale?.groups.users}`}
size="small"
outlined
textColor={theme.palette.black}
bgColor={theme.palette.neutralLight}
theme={theme}
className="m-1"
/>}
</Text>
<Text variant="small" styles={helpfulTextStyles} className="mb-2">
<JsxParser bindings={{ theme: theme, semibold: semibold }} components={{ Text, Link, Icon }} jsx={"<Icon iconName='Info' /> " + description} />
Expand Down
8 changes: 4 additions & 4 deletions services/LocalizationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,15 @@ class LocalizationService {
universityGroups: {
label: `<Text variant="mega" style={{ lineHeight: 1.3, fontWeight: 700, textAlign: 'center' }}>Gruppi <Text style={{ color: theme.palette.themePrimary, fontWeight: 700 }} variant="mega">universitari</Text></Text>`,
title: "Unisciti ai nostri gruppi universitari",
description: "Parla e discuti con altri studenti riguardo tutti i topic di cui hai bisogno",
description: "Parla e discuti con altri studenti riguardo tutti i topic di cui hai bisogno.",
description2: "Pensi manchi qualche gruppo in particolare?",
card: {
type: 'Gruppo universitario'
}
},
announcementsGroups: {
label: `<Text variant="mega" style={{ lineHeight: 1.3, fontWeight: 700, textAlign: 'center' }}>Gruppi per gli <Text style={{ color: theme.palette.themePrimary, fontWeight: 700 }} variant="mega">annunci</Text></Text>`,
title: "Posta un annuncio sui nostri gruppi appositi",
title: "Posta un annuncio sui nostri gruppi appositi.",
description: "Abbiamo creato dei gruppi dedicati esclusivamente alla pubblicazione di annunci sia di ricerca che di offerta, come ad esempio per i libri ed appunti e le ripetizioni.",
description2: `<Text variant="medium">Per postare un annuncio segui il <Text variant='medium' styles={bold} style={{ color: theme.palette.themeDarkAlt }}>template</Text> che trovi nei messaggi fissati quando entri.</Text>`,
card: {
Expand Down Expand Up @@ -697,15 +697,15 @@ class LocalizationService {
universityGroups: {
label: `<Text variant="mega" style={{ lineHeight: 1.3, fontWeight: 700, textAlign: 'center' }}>University <Text style={{ color: theme.palette.themePrimary, fontWeight: 700 }} variant="mega">groups</Text></Text>`,
title: "Join the university groups of our Network",
description: "Talk and discuss with other students about all the topics you need",
description: "Talk and discuss with other students about all the topics you need.",
description2: "Do you think any particular group is missing?",
card: {
type: 'University group'
}
},
announcementsGroups: {
label: `<Text variant="mega" style={{ lineHeight: 1.3, fontWeight: 700, textAlign: 'center' }}>Announcements<Text style={{ color: theme.palette.themePrimary, fontWeight: 700 }} variant="mega"> groups</Text></Text>`,
title: "Post an ad on our dedicated groups",
title: "Post an ad on our dedicated groups.",
description: "We have created groups dedicated exclusively to posting both want and offer ads, such as for books and notes and private lessons.",
description2: `<Text variant="medium">To post an ad follow the <Text variant='medium' styles={bold} style={{ color: theme.palette.themeDarkAlt }}>template</Text> that you can find in the pinned messages set when you enter.</Text>`,
card: {
Expand Down
4 changes: 2 additions & 2 deletions services/Requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const representativesEndpoint = '/representatives';
const typingDegreesEndpoint = '/typing-degrees';
const searchDegreesEndpoint = '/search-degrees';
const adminsEndpoint = '/admins';
const extraGroupsEndpoint = '/extra-groups';
const featuredGroupsEndpoint = '/featured-groups';

/* Main class to build response */
class Result<T>
Expand Down Expand Up @@ -150,7 +150,7 @@ export async function getDegreeAdmins(degreeSlug: string): Promise<Result<Array<
* @returns {ExtraGroups} Extra Groups
*/
export async function getExtraGroups(): Promise<Result<ExtraGroups>> {
return getAsync<ExtraGroups>(`${apiEndpoint}${extraGroupsEndpoint}`);
return getAsync<ExtraGroups>(`${apiEndpoint}${featuredGroupsEndpoint}`);
};


Expand Down

0 comments on commit 97c9d7d

Please sign in to comment.