diff --git a/pdf/getting-started-with-vector-databases-introduction-to-milvus.pdf b/pdf/getting-started-with-vector-databases-introduction-to-milvus.pdf index 65398c5..b9f491f 100644 Binary files a/pdf/getting-started-with-vector-databases-introduction-to-milvus.pdf and b/pdf/getting-started-with-vector-databases-introduction-to-milvus.pdf differ diff --git a/pdf/getting-started-with-vector-databases-introduction-to-unstructured-data.pdf b/pdf/getting-started-with-vector-databases-introduction-to-unstructured-data.pdf index 9142835..35b61fc 100644 Binary files a/pdf/getting-started-with-vector-databases-introduction-to-unstructured-data.pdf and b/pdf/getting-started-with-vector-databases-introduction-to-unstructured-data.pdf differ diff --git a/pdf/getting-started-with-vector-databases-introduction-to-vector-similarity-search.pdf b/pdf/getting-started-with-vector-databases-introduction-to-vector-similarity-search.pdf index dc01349..61612fd 100644 Binary files a/pdf/getting-started-with-vector-databases-introduction-to-vector-similarity-search.pdf and b/pdf/getting-started-with-vector-databases-introduction-to-vector-similarity-search.pdf differ diff --git a/pdf/getting-started-with-vector-databases-milvus-quickstart.pdf b/pdf/getting-started-with-vector-databases-milvus-quickstart.pdf index 52593dc..002e9ad 100644 Binary files a/pdf/getting-started-with-vector-databases-milvus-quickstart.pdf and b/pdf/getting-started-with-vector-databases-milvus-quickstart.pdf differ diff --git a/pdf/getting-started-with-vector-databases-what-is-a-vector-database.pdf b/pdf/getting-started-with-vector-databases-what-is-a-vector-database.pdf index f93c604..b6fff9a 100644 Binary files a/pdf/getting-started-with-vector-databases-what-is-a-vector-database.pdf and b/pdf/getting-started-with-vector-databases-what-is-a-vector-database.pdf differ diff --git a/src/components/commonComponents/githubButton/icons.jsx b/src/components/commonComponents/githubButton/icons.jsx new file mode 100644 index 0000000..b4db648 --- /dev/null +++ b/src/components/commonComponents/githubButton/icons.jsx @@ -0,0 +1,33 @@ +import React from 'react'; + +export const Fork = () => ( + +); + +export const Star = () => ( + +); diff --git a/src/components/commonComponents/githubButton/index.jsx b/src/components/commonComponents/githubButton/index.jsx index 66f2ce4..61e96c8 100644 --- a/src/components/commonComponents/githubButton/index.jsx +++ b/src/components/commonComponents/githubButton/index.jsx @@ -1,32 +1,8 @@ import React from 'react'; -import Divider from '@mui/material/Divider'; import * as styles from './index.module.less'; - -const ForkIcon = () => ( - -); - -const GitHubIcon = () => ( - -); +import { useMemo } from 'react'; +import { Star, Fork } from './icons'; +import clsx from 'clsx'; const GitHubButton = ({ type = 'star', // star or fork @@ -36,23 +12,43 @@ const GitHubButton = ({ stat, }) => { const isStar = type === 'star'; + const link = isStar ? href : `${href}/fork`; + + const Icon = isStar ? Star : Fork; + + const formatNum = num => { + return num >= 1000 ? `${Math.round(num / 100) / 10}k` : num; + }; - const sublink = isStar ? `${href}/stargazers` : `${href}/network/members`; + const stats = useMemo(() => { + const stars = stat.star; + const forks = stat.forks; + + return { + star: formatNum(stars), + fork: formatNum(forks), + }; + }, [stat]); return (