update add frontend API credentials
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
import { Editor } from "@reacteditor/core";
|
import { Editor, blocksPlugin, outlinePlugin } from "@reacteditor/core";
|
||||||
import createTailwindCdnPlugin from "@reacteditor/plugin-tailwind-cdn";
|
import createTailwindCdnPlugin from "@reacteditor/plugin-tailwind-cdn";
|
||||||
import { createShopifyPlugin } from "@reacteditor/plugin-shopify";
|
import { createShopifyPlugin } from "@reacteditor/plugin-shopify";
|
||||||
import { aiPlugin } from "@reacteditor/plugin-ai";
|
import { aiPlugin } from "@reacteditor/plugin-ai";
|
||||||
@@ -20,19 +20,21 @@ export default function EditorPage() {
|
|||||||
|
|
||||||
const plugins = useMemo(
|
const plugins = useMemo(
|
||||||
() => [
|
() => [
|
||||||
|
aiPlugin({
|
||||||
|
api: "https://cloud.frontend.co/api/chat",
|
||||||
|
headers: { "x-api-key": process.env.NEXT_PUBLIC_FRONTEND_API_KEY },
|
||||||
|
}),
|
||||||
|
blocksPlugin(),
|
||||||
|
outlinePlugin(),
|
||||||
|
mediaPlugin({
|
||||||
|
adapter: mediaAdapter,
|
||||||
|
}),
|
||||||
createTailwindCdnPlugin(),
|
createTailwindCdnPlugin(),
|
||||||
createShopifyPlugin({
|
createShopifyPlugin({
|
||||||
storeDomain: process.env.NEXT_PUBLIC_SHOPIFY_DOMAIN ?? "mock.shop",
|
storeDomain: process.env.NEXT_PUBLIC_SHOPIFY_DOMAIN ?? "mock.shop",
|
||||||
publicAccessToken:
|
publicAccessToken:
|
||||||
process.env.NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN,
|
process.env.NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN,
|
||||||
}),
|
}),
|
||||||
aiPlugin({
|
|
||||||
api: "https://cloud.frontend.co/api/chat",
|
|
||||||
headers: { "x-api-key": process.env.NEXT_PUBLIC_FRONTEND_API_KEY },
|
|
||||||
}),
|
|
||||||
mediaPlugin({
|
|
||||||
adapter: mediaAdapter,
|
|
||||||
}),
|
|
||||||
],
|
],
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user