@portal-dx/plugin-positive-quotes
Display a random positive quote message from "O Pensador".
This plugin was created through the Backstage CLI
Requirements
Install
yarn add @portal-dx/plugin-positive-quotes
or
npm i @portal-dx/plugin-positive-quotes
Use
app-config.yaml
[...]
proxy:
'/positive-quotes':
target: 'https://quotes-br.herokuapp.com/api/'
changeOrigin: true
allowedMethods: [GET, POST]
pathRewrite:
'^/api/proxy/positive-quotes/': '/'
[...]
routes.tsx
packages/app/src/routes.tsx
import { PositiveQuotesPage } from '@portal-dx/plugin-positive-quotes';
const routes = (
<FlatRoutes>
// ...
<Route path="/positive-quotes" element={<PositiveQuotesPage />} />
</FlatRoutes>
);
Import the component where you want to use it:
src/components/common/WelcomeHeader/WelcomeHeader.tsx
import { PositiveQuoteText } from '@portal-dx/plugin-positive-quotes';
const routes = (
<>
// ...
<PositiveQuoteText />
</>
);
Developed with ❤️ by the MadeiraMadeira DX Team