diff --git a/src/components/Offers/Tags/TagItem.js b/src/components/Offers/Tags/TagItem.js
new file mode 100644
index 0000000..598aa42
--- /dev/null
+++ b/src/components/Offers/Tags/TagItem.js
@@ -0,0 +1,13 @@
+import React from 'react';
+import { Link } from 'gatsby'
+import sligify from '../../../helpers/slugify'
+
+const TagItem = ({ title }) => {
+ return (
+
+ {title}
+
+ )
+}
+
+export default TagItem
\ No newline at end of file
diff --git a/src/components/Offers/Tags/Tags.js b/src/components/Offers/Tags/Tags.js
index 7d34e60..baf6f72 100644
--- a/src/components/Offers/Tags/Tags.js
+++ b/src/components/Offers/Tags/Tags.js
@@ -1,20 +1,8 @@
import React from 'react'
-import { Link } from 'gatsby'
-import sligify from '../../../helpers/slugify'
-import useTagsQuery from '../../../hooks/useTagsQuery'
import TagIcon from '../../../images/tag-icon.svg'
-const TagItem = ({ title }) => {
- return (
-
- {title}
-
- )
-}
-
-const Tags = () => {
- const { edges } = useTagsQuery()
+const Tags = ({ children }) => {
return (
@@ -23,7 +11,7 @@ const Tags = () => {
Тэги
- {edges.map(({ node }, i) => )}
+ {children}
)
diff --git a/src/hooks/useTagsQuery.js b/src/hooks/useTagsQuery.js
index d3049e4..6f92170 100644
--- a/src/hooks/useTagsQuery.js
+++ b/src/hooks/useTagsQuery.js
@@ -14,7 +14,7 @@ const useTagsQuery = () => {
}
}
`)
- return { edges }
+ return { tags: edges }
}
export default useTagsQuery
\ No newline at end of file