From 82cd11e01e7f772523fc66ab564903b19d26af1c Mon Sep 17 00:00:00 2001 From: Syed Sajjad Hussain Shah <52817156+syedsajjadkazmii@users.noreply.github.com> Date: Mon, 31 Jul 2023 16:36:47 +0500 Subject: [PATCH] refactor: refactor recs dir (#1012) --- src/recommendations/RecommendationsPage.jsx | 2 +- src/recommendations/{ProductCard => data}/hooks/useProducts.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/recommendations/{ProductCard => data}/hooks/useProducts.jsx (92%) diff --git a/src/recommendations/RecommendationsPage.jsx b/src/recommendations/RecommendationsPage.jsx index 2950943e..65b92587 100644 --- a/src/recommendations/RecommendationsPage.jsx +++ b/src/recommendations/RecommendationsPage.jsx @@ -10,8 +10,8 @@ import PropTypes from 'prop-types'; import { Helmet } from 'react-helmet'; import { POPULAR, TRENDING } from './data/constants'; +import useProducts from './data/hooks/useProducts'; import messages from './messages'; -import useProducts from './ProductCard/hooks/useProducts'; import RecommendationsList from './RecommendationsList'; import { trackRecommendationsViewed } from './track'; import { DEFAULT_REDIRECT_URL } from '../data/constants'; diff --git a/src/recommendations/ProductCard/hooks/useProducts.jsx b/src/recommendations/data/hooks/useProducts.jsx similarity index 92% rename from src/recommendations/ProductCard/hooks/useProducts.jsx rename to src/recommendations/data/hooks/useProducts.jsx index 1b16a0a6..7ea3cae4 100644 --- a/src/recommendations/ProductCard/hooks/useProducts.jsx +++ b/src/recommendations/data/hooks/useProducts.jsx @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { filterLocationRestriction } from '../../data/utils'; +import { filterLocationRestriction } from '../utils'; export default function useProducts(countryCode) { const [isLoading, setLoading] = useState(true);