diff options
author | Michael Foiani <mfoiani2019@communityschoolnaples.org> | 2018-07-25 19:58:53 -0400 |
---|---|---|
committer | Michael Foiani <mfoiani2019@communityschoolnaples.org> | 2018-07-25 19:58:53 -0400 |
commit | 2b253a35d7f33a256cf52d555ce5ca39206c7bb2 (patch) | |
tree | cfd06077b9b947993d149419621cd4e506f3c8f2 /src | |
parent | a0ebbc6794ed7e0e720f454bfd8e8ae613733396 (diff) |
Replaced View1 with Home View
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/app.js | 6 | ||||
-rw-r--r-- | src/components/mao-app.js | 6 | ||||
-rw-r--r-- | src/components/mao-home.js (renamed from src/components/my-view1.js) | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/actions/app.js b/src/actions/app.js index 50d1529..d943671 100644 --- a/src/actions/app.js +++ b/src/actions/app.js @@ -16,7 +16,7 @@ export const CLOSE_SNACKBAR = 'CLOSE_SNACKBAR'; export const navigate = (path) => (dispatch) => { // Extract the page name from path. - const page = path === '/' ? 'view1' : path.slice(1); + const page = path === '/' ? 'home' : path.slice(1); // Any other info you might want to extract from the path (like page type), // you can do here @@ -28,8 +28,8 @@ export const navigate = (path) => (dispatch) => { const loadPage = (page) => (dispatch) => { switch(page) { - case 'view1': - import('../components/my-view1.js').then((module) => { + case 'home': + import('../components/mao-home.js').then((module) => { // Put code in here that you want to run every time when // navigating to view1 after my-view1.js is loaded. }); diff --git a/src/components/mao-app.js b/src/components/mao-app.js index 48c5f61..59c811a 100644 --- a/src/components/mao-app.js +++ b/src/components/mao-app.js @@ -189,7 +189,7 @@ class MaoApp extends connect(store)(LitElement) { <!-- This gets hidden on a small screen--> <nav class="toolbar-list"> - <a selected?="${_page === 'view1'}" href="/view1">View One</a> + <a selected?="${_page === 'home'}" href="/home">Home</a> <a selected?="${_page === 'view2'}" href="/view2">View Two</a> <a selected?="${_page === 'view3'}" href="/view3">View Three</a> </nav> @@ -199,7 +199,7 @@ class MaoApp extends connect(store)(LitElement) { <app-drawer opened="${_drawerOpened}" on-opened-changed="${e => store.dispatch(updateDrawerState(e.target.opened))}"> <nav class="drawer-list"> - <a selected?="${_page === 'view1'}" href="/view1">View One</a> + <a selected?="${_page === 'home'}" href="/home">Home</a> <a selected?="${_page === 'view2'}" href="/view2">View Two</a> <a selected?="${_page === 'view3'}" href="/view3">View Three</a> </nav> @@ -207,7 +207,7 @@ class MaoApp extends connect(store)(LitElement) { <!-- Main content --> <main role="main" class="main-content"> - <my-view1 class="page" active?="${_page === 'view1'}"></my-view1> + <mao-home class="page" active?="${_page === 'home'}"></mao-home> <my-view2 class="page" active?="${_page === 'view2'}"></my-view2> <my-view3 class="page" active?="${_page === 'view3'}"></my-view3> <my-view404 class="page" active?="${_page === 'view404'}"></my-view404> diff --git a/src/components/my-view1.js b/src/components/mao-home.js index 6ab10ac..468677f 100644 --- a/src/components/my-view1.js +++ b/src/components/mao-home.js @@ -14,7 +14,7 @@ import { PageViewElement } from './page-view-element.js'; // These are the shared styles needed by this element. import { SharedStyles } from './shared-styles.js'; -class MyView1 extends PageViewElement { +class MaoHome extends PageViewElement { _render(props) { return html` ${SharedStyles} @@ -34,4 +34,4 @@ class MyView1 extends PageViewElement { } } -window.customElements.define('my-view1', MyView1); +window.customElements.define('mao-home', MaoHome); |