diff --git a/web/src/components/browse/namespace-grid.tsx b/web/src/components/browse/namespace-grid.tsx new file mode 100644 index 00000000..33ad4a71 --- /dev/null +++ b/web/src/components/browse/namespace-grid.tsx @@ -0,0 +1,44 @@ +import React, { useRef, useEffect, useCallback } from 'react'; + +import { BiggestNamespaceResults } from '../../../types'; + +type Props = { + namespaces: BiggestNamespaceResults[] | undefined; + selectedNamespace: string | undefined; + handleSelectNamespace: (selectedNamespace: string) => void; +}; + +export const NamespaceGrid = (props: Props) => { + const { + namespaces, + selectedNamespace, + handleSelectNamespace + } = props; + + return ( +
+ handleSelectNamespace(item?.namespace)}> + {index + 1}. {item?.namespace} + +
++ {item?.number_of_projects} Projects +
+- handleSelectNamespace(item?.namespace)}> - {startIndex + index + 1}. {item?.namespace} - -
-- {item?.number_of_projects} Projects -
-- handleSelectNamespace(item?.namespace)}> - {index + 1}. {item?.namespace} - -
-- {item?.number_of_projects} Projects -
-