Skip to content

Commit

Permalink
Merge pull request HikkaTown#40 from HikkaTown/pravki_product_page
Browse files Browse the repository at this point in the history
fix tabs
  • Loading branch information
HikkaTown authored May 26, 2022
2 parents 92c452c + 8b9a022 commit f308c67
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default function StepComponent({

useEffect(() => {
let filters = [];
console.log(products);
products.map((item) => {
if (item.category) {
!filters.includes(item.category) ? filters.push(item.category) : "";
Expand All @@ -77,7 +78,6 @@ export default function StepComponent({
loop: true,
breakpoints: {
"(min-width: 767.98px)": {
drag: false,
slides: {
perView: "auto",
spacing: 24,
Expand Down
17 changes: 14 additions & 3 deletions frontend/src/lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,23 @@ export const getProjectPageQuery = gql`

export const getProjectTabsQuery = gql`
query projectTabs {
tabyproektovs(sort: "position:asc") {
tabyproektovs(
sort: "position:asc"
pagination: { page: 1, pageSize: 1000 }
) {
data {
id
attributes {
typeProjectName
position
}
}
meta {
pagination {
page
pageSize
}
}
}
}
`;
Expand All @@ -111,7 +120,7 @@ export const getAllProjectsCardQuery = gql`
data {
id
attributes {
images {
images(pagination: { page: 1, pageSize: 100 }) {
data {
attributes {
url
Expand Down Expand Up @@ -605,7 +614,9 @@ export const getCurrentProductCardQuery = (url) => gql`
}
steps {
header
step {
step(pagination: {
page: 1, pageSize: 100
}) {
id
productName
productPrice
Expand Down

0 comments on commit f308c67

Please sign in to comment.