Download wp-calypso/client/data/sites/use-site-excerpts-sorted.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 649 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/sites/use-site-excerpts-sorted.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/data/sites/use-site-excerpts-sorted.ts
-
curl -L -o use-site-excerpts-sorted.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/sites/use-site-excerpts-sorted.ts
649 Bytes
| import { useSitesListFiltering, useSitesListSorting } from '@automattic/sites'; | |
| import { useSitesSorting } from 'calypso/state/sites/hooks/use-sites-sorting'; | |
| import { useSiteExcerptsQuery } from './use-site-excerpts-query'; | |
| import type { SiteExcerptData } from '@automattic/sites'; | |
| export const useSiteExcerptsSorted = (): SiteExcerptData[] => { | |
| const { data: allSites = [] } = useSiteExcerptsQuery( | |
| [], | |
| ( site ) => ! site.options?.is_domain_only | |
| ); | |
| const { sitesSorting } = useSitesSorting(); | |
| const sortedSites = useSitesListSorting( allSites, sitesSorting ); | |
| return useSitesListFiltering( sortedSites, { includeA8CSites: false } ); | |
| }; | |