Skip to content

Commit

Permalink
Revert "set members order of appearance"
Browse files Browse the repository at this point in the history
This reverts commit 424e426.
  • Loading branch information
renemennab committed Jun 18, 2024
1 parent 3782c2f commit 6da5993
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
24 changes: 10 additions & 14 deletions src/components/page-sections/TeamSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useCallback, useRef, useState } from 'react'

import { ColorModeProvider, TabList, TabPanel } from '@pluralsh/design-system'

import { sortBy } from 'lodash-es'
import styled from 'styled-components'

import { mqs } from '@src/breakpoints'
Expand Down Expand Up @@ -155,21 +154,18 @@ export function TeamSection({ members }: { members: TeamMemberFragment[] }) {
onSelectionChange: useCallback((key) => setCategory(key as string), []),
}

const filteredMembers = sortBy(
members.filter((member) => {
if (!category) {
return true
}
const categories = member.categories as unknown
const filteredMembers = members.filter((member) => {
if (!category) {
return true
}
const categories = member.categories as unknown

if (Array.isArray(categories)) {
return categories.includes(category)
}
if (Array.isArray(categories)) {
return categories.includes(category)
}

return false
}),
'orderOfAppearance'
)
return false
})

return (
<div>
Expand Down
5 changes: 2 additions & 3 deletions src/generated/graphqlDirectus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7567,12 +7567,12 @@ export type StackExtrasQuery = { __typename?: 'Query', stacks: Array<{ __typenam

export type ImageFileFragment = { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null };

export type TeamMemberFragment = { __typename?: 'team_members', id: string, name?: string | null, title?: string | null, categories?: any | null, pronouns?: string | null, orderOfAppearance?: number | null, portrait?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null };
export type TeamMemberFragment = { __typename?: 'team_members', id: string, name?: string | null, title?: string | null, categories?: any | null, pronouns?: string | null, portrait?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null };

export type TeamMembersQueryVariables = Exact<{ [key: string]: never; }>;


export type TeamMembersQuery = { __typename?: 'Query', team_members: Array<{ __typename?: 'team_members', id: string, name?: string | null, title?: string | null, categories?: any | null, pronouns?: string | null, orderOfAppearance?: number | null, portrait?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null }> };
export type TeamMembersQuery = { __typename?: 'Query', team_members: Array<{ __typename?: 'team_members', id: string, name?: string | null, title?: string | null, categories?: any | null, pronouns?: string | null, portrait?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null }> };

export type FeaturedContributorFragment = { __typename?: 'featured_contributors', id: string, name?: string | null, title?: string | null, social_github_url?: string | null, social_twitter_url?: string | null, social_linkedin_url?: string | null, content?: string | null, ctas?: any | null, portrait?: { __typename?: 'directus_files', id: string, title?: string | null, description?: string | null, tags?: any | null, filename_disk?: string | null, filename_download: string, metadata?: any | null, type?: string | null, filesize?: any | null } | null };

Expand Down Expand Up @@ -7825,7 +7825,6 @@ export const TeamMemberFragmentDoc = gql`
title
categories
pronouns
orderOfAppearance
portrait {
...ImageFile
}
Expand Down
1 change: 0 additions & 1 deletion src/graph/directus/cms.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ fragment TeamMember on team_members {
title
categories
pronouns
orderOfAppearance
portrait {
...ImageFile
}
Expand Down

0 comments on commit 6da5993

Please sign in to comment.