Facebook
From Jon Snow, 1 Week ago, written in JavaScript.
Embed
Download Paste or View Raw
Hits: 149
  1. import React from 'react';
  2. import { Paragraph } from '@contentful/f36-components';
  3. import { PageAppSDK } from '@contentful/app-sdk';
  4. import { /* useCMA, */ useSDK } from '@contentful/react-apps-toolkit';
  5.  
  6. const Page = () => {
  7.   const sdk = useSDK<PageAppSDK>();
  8.   /*
  9.      To use the cma, inject it as follows.
  10.      If it is not needed, you can remove the next line.
  11.   */
  12.   // const cma = useCMA();
  13.  
  14.   return <Paragraph>Hello Page Component (AppId: {sdk.ids.app})</Paragraph>;
  15. };
  16.  
  17. export default Page;
  18.