Skip to content

Commit

Permalink
fix: lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand Gorantala committed Oct 9, 2024
1 parent f902dc2 commit a3fd07b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
12 changes: 8 additions & 4 deletions examples/pixel/src/app/DeveloperToolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ export function DeveloperToolbar() {
<Alert type="warning">
In an online code editor iframe preview, the cookie is not set in the correct domain. For the
cookie to be set and sent in the pixel events to see the full set of features in this
code sample, open the {' '}
<a href="" target="_blank" className="text-blue-600 hover:underline">
preview in a separate window <ExternalLinkIcon size={10} className="inline" />
</a> {' '}
code sample, open the
{' '}
<a href="." target="_blank" className="text-blue-600 hover:underline">
preview in a separate window
{' '}
<ExternalLinkIcon size={10} className="inline" />
</a>
{' '}
or run the example locally.
</Alert>
) : null}
Expand Down
1 change: 0 additions & 1 deletion examples/pixel/src/app/categories/[id]/page.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use client';

import { useCallback, useEffect, useState } from 'react';
import Link from 'next/link';
import { usePathname, useRouter } from 'next/navigation';
import JsonView from '@uiw/react-json-view';
import { LoaderIcon, Pagination } from '@bloomreach/react-banana-ui';
Expand Down
4 changes: 2 additions & 2 deletions examples/pixel/src/app/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function Home() {
<div className="font-semibold text-xl my-4 mt-8 opacity-80">Shop by category</div>
<div className="flex flex-col">
{showJson ? (
<JsonView value={categories} collapsed={1}/>
<JsonView value={categories} collapsed={1} />
) : (
<div className="grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4">
{categories.map((category) => (
Expand Down Expand Up @@ -105,7 +105,7 @@ export default function Home() {
</div>

<div className="w-full mt-8" ref={ref}>
{isIntersecting && (<PersonalizedWidget widgetId={recently_viewed_widget_id}/>)}
{isIntersecting && (<PersonalizedWidget widgetId={recently_viewed_widget_id} />)}
</div>
</>
)}
Expand Down
4 changes: 2 additions & 2 deletions examples/pixel/src/app/products/[id]/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export default function Page({ params }) {
}, [pid]);

const product = useMemo(() => data?.response?.docs[0], [data]);
const sku = useMemo(() => product && product.variants.length ? product.variants[0].skuid : undefined, [product]);
const title = useMemo(() => product ? product.title : undefined, [product]);
const sku = useMemo(() => ((product && product.variants.length) ? product.variants[0].skuid : undefined), [product]);
const title = useMemo(() => (product ? product.title : undefined), [product]);

useEffect(() => {
if (!pid || !title) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export function ItemBasedRecommendationsWidget({ title = 'Similar products', wid
});
}, [data]);


if (!data?.response) {
return null;
}
Expand Down
1 change: 0 additions & 1 deletion examples/pixel/src/components/PersonalizedWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export function PersonalizedWidget({ widgetId, title = 'Recently viewed products
});
}, [data]);


if (!data?.response) {
return null;
}
Expand Down
1 change: 0 additions & 1 deletion examples/pixel/src/hooks/useAnalytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ function useAnalytics() {
const [events, setEvents] = useLocalStorage('BrPixelDemoAnalytics', []);
const [userId, setUserId] = useLocalStorage('BrPixelDemoUserId', '');
const [eventsCount, setEventsCount] = useState(0);
const pathname = usePathname();

useEffect(() => {
setEventsCount(events.length);
Expand Down

0 comments on commit a3fd07b

Please sign in to comment.