Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #16

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions app/routes/($locale)._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ export async function loader({context}: LoaderFunctionArgs) {
const {storefront} = context;
const recommendedProducts = storefront.query(RECOMMENDED_PRODUCTS_QUERY);
const envConfig = context.env;
console.info('ENV CONFIG HOME PAGE', envConfig);
const fetchData = async () => {
try {
const result = await getEntryByUid({
contentTypeUid: 'shopify_home',
entryUid: 'blt9743f5cf3740e66a',
envConfig,
});
console.info('HOMEPAGE CMS DATA', result);
return result;
} catch (error) {
// eslint-disable-next-line no-console
Expand All @@ -38,7 +36,6 @@ export async function loader({context}: LoaderFunctionArgs) {

export default function Homepage() {
const data = useLoaderData<typeof loader>();
console.info('HOMEPAGE CMS DATA', data);
return (
<div className="home flex pg_bt">
<RecommendedProducts
Expand Down
2 changes: 0 additions & 2 deletions app/routes/($locale).about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export async function loader({context}: LoaderFunctionArgs) {
entryUid: 'blta3850ce0d777edd0',
envConfig,
});
console.info(result, 'RESULTS OF CMS DATA IN ABOUT US PAGE');
return result;
} catch (error) {
// eslint-disable-next-line no-console
Expand All @@ -30,7 +29,6 @@ export async function loader({context}: LoaderFunctionArgs) {

export default function Homepage() {
const data = useLoaderData<typeof loader>();
console.info('ABOUT US CMS DATA', data.fetchedData);
return (
<div className="home flex pg_bt">
<RecommendedProducts cmsData={data.fetchedData} />
Expand Down
3 changes: 0 additions & 3 deletions app/routes/($locale).collections.all.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ export async function loader({context, request}: LoaderFunctionArgs) {
);

const envConfig = context.env;
console.info('ENV CONFIG IN PRODUCT PAGE', envConfig);
const fetchData = async () => {
try {
const result = await getEntryByUid({
contentTypeUid: 'shopify_home',
entryUid: 'blt9743f5cf3740e66a',
envConfig,
});
console.info(result, 'RESULTS OF CMS DATA');
return result;
} catch (error) {
// eslint-disable-next-line no-console
Expand All @@ -52,7 +50,6 @@ export async function loader({context, request}: LoaderFunctionArgs) {

export default function Productpage() {
const data = useLoaderData<typeof loader>();
console.info('PRODUCT PAGE CMS DATA', data.fetchedData);
return (
<div className="home flex container pg_bt">
<Pagination connection={data?.recommendedProducts?.products}>
Expand Down
Loading