Skip to content

Commit

Permalink
chore: remove example app
Browse files Browse the repository at this point in the history
  • Loading branch information
breadadams committed Aug 15, 2023
1 parent c551e19 commit 7968bd5
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 292 deletions.
147 changes: 0 additions & 147 deletions src/app/productDescription/[productId]/form.tsx

This file was deleted.

33 changes: 0 additions & 33 deletions src/app/productDescription/[productId]/generator.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions src/app/productDescription/[productId]/loading.tsx

This file was deleted.

45 changes: 0 additions & 45 deletions src/app/productDescription/[productId]/page.tsx

This file was deleted.

60 changes: 0 additions & 60 deletions src/lib/appExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,6 @@ export const createAppExtension = async ({
if (errors && errors.length > 0) {
throw new Error(errors[0]?.message);
}

// Create the review app extension

const response2 = await fetch(
`${BIGCOMMERCE_API_URL}/stores/${storeHash}/graphql`,
{
method: 'POST',
headers: {
accept: 'application/json',
'content-type': 'application/json',
'x-auth-token': accessToken,
},
body: JSON.stringify(createReviewsAppExtensionMutation()),
}
);

const { errors: errors2 } = await response2.json();

if (errors2 && errors2.length > 0) {
throw new Error(errors2[0]?.message);
}
};

export const getAppExtensions = async ({
Expand Down Expand Up @@ -102,45 +81,6 @@ const getAppExtensionsQuery = () => ({
});

const createAppExtensionMutation = () => ({
query: `
mutation AppExtension($input: CreateAppExtensionInput!) {
appExtension {
createAppExtension(input: $input) {
appExtension {
id
context
model
url
label {
defaultValue
locales {
value
localeCode
}
}
}
}
}
}`,
variables: {
input: {
context: 'PANEL',
model: 'PRODUCT_DESCRIPTION',
url: '/productDescription/${id}',
label: {
defaultValue: 'Generate text',
locales: [
{
value: 'Generate text',
localeCode: 'en-US',
},
],
},
},
},
});

const createReviewsAppExtensionMutation = () => ({
query: `
mutation AppExtension($input: CreateAppExtensionInput!) {
appExtension {
Expand Down

0 comments on commit 7968bd5

Please sign in to comment.