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

dev -> main #22

Merged
merged 2 commits into from
Aug 13, 2023
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
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