New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@entando/pages

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@entando/pages

react components used to render common pages in Entando projects

latest
Source
npmnpm
Version
3.3.2
Version published
Maintainers
1
Created
Source

pages

Pages is a collection of react components used in Entando projects.

Installation instructions

run npm i @entando/pages

Components

Every component is imported in the following manner:

import { <component> } from '@entando/pages'

The module also has its own css that can be loaded into a react application with a simple import:

import '@entando/pages/dist/css/index.css';

LoginForm

This component is used to render the login form.

The component expects the following props:

{
  performLogin: PropTypes.func.isRequired,
  setLanguage: PropTypes.func.isRequired,
  loginErrorMessage: PropTypes.string, // defaults to empty string
  currentLanguage: PropTypes.string, // defaults to "en"
}

the performLogin function will receive two arguments:

  • username
  • password

the setLanguage function will receive one argument:

  • language

LoginPage

Renders the login page and just accepts any children. It is common to pass the LoginForm as a child component.

NotFoundPage

Renders the 404 page.

The component expects the following props:

{
  gotoHome: PropTypes.func, // defaults to null
}

if the gotoHome function is passed the page will render a button that will call the given function when the user clicks on it.

locales

This package also exports locales for the labels used within it.

To add these labels to an existing project merge them with the project labels:

import { locales } from '@entando/pages';

// enLocale and itLocale are the project own locales.

enLocale.messages = { ...enLocale.messages, ...locales.en.messages };
itLocale.messages = { ...itLocale.messages, ...locales.it.messages };

Keywords

entando

FAQs

Package last updated on 19 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts