From e13e630cd6e4fc0b1ff92098a28a770794c7bb9a Mon Sep 17 00:00:00 2001 From: gabrhr <73925454+gabrhr@users.noreply.github.com> Date: Wed, 20 Apr 2022 10:19:29 -0500 Subject: =?UTF-8?q?A=C3=B1adir=20plantilla?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Base para front --- front/odiparpack/app/containers/Parent/index.js | 72 +++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 front/odiparpack/app/containers/Parent/index.js (limited to 'front/odiparpack/app/containers/Parent') diff --git a/front/odiparpack/app/containers/Parent/index.js b/front/odiparpack/app/containers/Parent/index.js new file mode 100644 index 0000000..50067c3 --- /dev/null +++ b/front/odiparpack/app/containers/Parent/index.js @@ -0,0 +1,72 @@ +import React from 'react'; +import { PropTypes } from 'prop-types'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { Link } from 'react-router-dom'; +import MenuContent from 'ba-api/menu'; +import { PapperBlock } from 'ba-components'; +import { Button } from '@material-ui/core'; + +const styles = { + link: { + display: 'block', + textTransform: 'capitalize' + } +}; + +function sortByKey(array, key) { + return array.sort((a, b) => { + const x = a[key]; const y = b[key]; + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }); +} + +class Parent extends React.Component { + render() { + const title = brand.name; + const description = brand.desc; + const { classes } = this.props; + // Get Path Location + let parts = this.props.history.location.pathname.split('/'); + const place = parts[parts.length - 1]; + parts = parts.slice(1, parts.length - 1); + const menuItems = MenuContent + .find(obj => ( + obj.key === place + )); + const getMenus = menuArray => menuArray.map((item, index) => ( + + )); + return ( +