Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip committed Jan 11, 2021
1 parent 473f15b commit 41331f1
Show file tree
Hide file tree
Showing 22 changed files with 233 additions and 655 deletions.
30 changes: 0 additions & 30 deletions samples/subapp2-store/src/04.footer/app-footer.tsx

This file was deleted.

57 changes: 0 additions & 57 deletions samples/subapp2-store/src/05.extras/app-extras.tsx

This file was deleted.

24 changes: 9 additions & 15 deletions samples/subapp2-store/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
import { declareSubApp, xarcV2 } from "@xarc/react";


export const header = declareSubApp({
name: "header",
getModule: () => import("./header/app-header")
getModule: () => import("./subapps/header")
});

export const home = declareSubApp({
name: "home",
getModule: () => import("./home")
export const main = declareSubApp({
name: "main",
getModule: () => import("./subapps/main-body")
});

export const bottom = declareSubApp({
name: "bottom",
getModule: () => import("./subapps/03.bottom/bottom")
})
getModule: () => import("./subapps/bottom")
});

export const extras = declareSubApp({
name: "extras",
getModule: () => import("./05.extras/app-extras")
})
getModule: () => import("./subapps/extras")
});

export const footer = declareSubApp({
name: "footer",
getModule: () => import("./04.footer/app-footer")
})

export const staticHome = declareSubApp({
name: "static",
getModule: () => import("./static")
getModule: () => import("./subapps/footer")
});

xarcV2.debug("app.tsx");
2 changes: 1 addition & 1 deletion samples/subapp2-store/src/components/large.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ Large.propTypes = {
imagesData: PropTypes.array.isRequired
};

export default Large;
export { Large };
21 changes: 11 additions & 10 deletions samples/subapp2-store/src/components/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { React, ReactSubApp, AppContext } from "@xarc/react";
import { Route, Link } from "react-router-dom";
import { withRouter } from "react-router";
import classNames from "classnames";
import custom from "./bootstrap.css"
import custom from "../styles/bootstrap.css";

const NavItem = props => {
const { to, exact, strict, children } = props;
return (
Expand Down Expand Up @@ -41,33 +42,33 @@ const Navigation = () => {
</button>
<a className={custom["navbar-brand"]} href="#">
Logo
</a>
</a>
</div>
<div className={classNames(custom.collapse, custom["navbar-collapse"])} id="myNavbar">
<ul className={classNames(custom.nav, custom["navbar-nav"])}>
<NavItem exact={true} to="/">
Home
</NavItem>
</NavItem>
<NavItem to="/products">Products</NavItem>
<NavItem to="/stores">Stores</NavItem>
<NavItem to="/contact">Contact</NavItem>
</ul>
<ul className={classNames(custom.nav, custom["navbar-nav"], custom["navbar-right"])}>
<NavItem to="/account">
<span className={classNames(custom.glyphicon, custom["glyphicon-user"])} /> Your Account
</NavItem>
<span className={classNames(custom.glyphicon, custom["glyphicon-user"])} /> Your
Account
</NavItem>
<NavItem to="/cart">
<span className={classNames(custom.glyphicon, custom["glyphicon-shopping-cart"])} /> Cart
</NavItem>
<span className={classNames(custom.glyphicon, custom["glyphicon-shopping-cart"])} />{" "}
Cart
</NavItem>
</ul>
</div>
</div>
</nav>


);
};

//const RouterNavigation = withRouter(Navigation);

export default Navigation;
export { Navigation };
17 changes: 3 additions & 14 deletions samples/subapp2-store/src/components/products.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { React, ReactSubApp, AppContext } from "@xarc/react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import custom from "./bootstrap.css"
import custom from "../styles/bootstrap.css";

const DealItem = props => {
const { item } = props;
Expand Down Expand Up @@ -53,7 +53,6 @@ const Products = props => {
}

return (

<div className={custom.container}>
<p>Products</p>
<div>
Expand All @@ -63,8 +62,6 @@ const Products = props => {
</div>
{rows}
</div>


);
};

Expand All @@ -77,14 +74,6 @@ const mapStateToProps = state => {
return { items: state.items, value: state.number.value };
};

const ReduxProducts = connect(
mapStateToProps,
dispatch => ({ dispatch })
)(Products);

export { ReduxProducts as Component };
export const subapp: ReactSubApp = {
Component: ReduxProducts
};

const ReduxProducts = connect(mapStateToProps, dispatch => ({ dispatch }))(Products);

export { ReduxProducts as Products };
29 changes: 0 additions & 29 deletions samples/subapp2-store/src/demo1.tsx

This file was deleted.

45 changes: 0 additions & 45 deletions samples/subapp2-store/src/demo2.tsx

This file was deleted.

1 change: 0 additions & 1 deletion samples/subapp2-store/src/message.ts

This file was deleted.

Loading

0 comments on commit 41331f1

Please sign in to comment.