Skip to content

Commit

Permalink
Merge pull request #22 from ildecimo/develop
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
maxdyy committed Aug 13, 2023
2 parents 472ae92 + 9e5acda commit 189679e
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ildecimo BigAI - Product Review App CI
name: ildecimo Review Pulse - App CI

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# ildecimo BigAI - BigCommerce x Google Hackathon
# ildecimo Review Pulse - BigCommerce x Google Hackathon
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "bc-ai-ildecimo-app",
"name": "reviewpulse",
"version": "0.0.1",
"author": "BigCommerce",
"description": "BigCommerce Single-click App for enabling AI capabilities in CP",
"author": "ildecimo",
"description": "BigCommerce Single-click App for Reviews with Google Vertex AI",
"scripts": {
"build": "next build",
"dev": "next dev",
Expand Down
4 changes: 3 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ const sourceSans = Source_Sans_3({
weight: ['300', '400', '600', '700', '800'],
});

export const metadata: Metadata = { title: 'Review Pulse - ildecimo BigAI' };
export const metadata: Metadata = {
title: 'Review Pulse - ildecimo BigCommerce Google Vertex AI App',
};

export default function RootLayout({
children,
Expand Down
12 changes: 8 additions & 4 deletions src/components/ProductReviewList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ export const ProductReviewList = ({

const averageSentiment = useMemo(
() =>
Math.floor(
reviewAnalyses.reduce((acc, analysis) => acc + analysis.data.score, 0) /
reviewAnalyses.length
),
reviewAnalyses?.length
? Math.floor(
reviewAnalyses.reduce(
(acc, analysis) => acc + analysis.data.score,
0
) / reviewAnalyses.length
)
: undefined,
[reviewAnalyses]
);

Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ export const STYLE_OPTIONS = [
export const BIGCOMMERCE_LOGIN_URL = 'https://login.bigcommerce.com';
export const BIGCOMMERCE_API_URL = 'https://api.bigcommerce.com';

export const AUTH_COOKIE_NAME = 'bc-ai-app-auth-token';
export const AUTH_COOKIE_NAME = 'bc-ai-review-pulse';
4 changes: 2 additions & 2 deletions src/lib/appExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ const createReviewsAppExtensionMutation = () => ({
model: 'PRODUCTS',
url: '/product/${id}',
label: {
defaultValue: 'Product Review AI',
defaultValue: 'ildecimo Review Pulse',
locales: [
{
value: 'Product Review AI',
value: 'ildecimo Review Pulse',
localeCode: 'en-US',
},
],
Expand Down

0 comments on commit 189679e

Please sign in to comment.