This repository has been archived by the owner on Apr 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
261 additions
and
5 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import temperatureModel from './temperature-model' | ||
|
||
const storeModel = { | ||
temperature: temperatureModel | ||
// devices: [ | ||
// {1: {temperature: temperatureModel}}, | ||
// {2: {temperature: temperatureModel}}, | ||
// {3: {temperature: temperatureModel}}, | ||
// {4: {temperature: temperatureModel}}, | ||
// {5: {temperature: temperatureModel}}, | ||
// {6: {temperature: temperatureModel}}, | ||
// {7: {temperature: temperatureModel}}, | ||
// {8: {temperature: temperatureModel}}, | ||
// ] | ||
} | ||
|
||
export default storeModel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { action } from 'easy-peasy' | ||
|
||
const temperatureModel = { | ||
value: 0, | ||
values: [], | ||
unity: 'C' | ||
} | ||
|
||
export default temperatureModel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import App from 'next/app' | ||
import React from 'react' | ||
import withRedux from 'next-redux-wrapper' | ||
import { StoreProvider } from 'easy-peasy' | ||
import { initializeStore } from '../store' | ||
|
||
class MyApp extends App { | ||
render () { | ||
const { Component, pageProps, store } = this.props | ||
|
||
console.log('__STORE__', store) | ||
|
||
// Workaround for https://github.com/zeit/next.js/issues/8592 | ||
// const { err } = this.props | ||
const modifiedPageProps = { ...pageProps } | ||
|
||
return ( | ||
<StoreProvider store={store}> | ||
<Component {...modifiedPageProps} /> | ||
</StoreProvider> | ||
) | ||
} | ||
} | ||
|
||
export default withRedux(initializeStore)(MyApp) |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,71 @@ | ||
import '../styles/index.css' | ||
|
||
export default () => ( | ||
<div className='p-4 shadow rounded bg-white'> | ||
<h1 className='text-purple-500 leading-normal'>lifeinaweb</h1> | ||
<div className='p-4 shadow rounded bg-black'> | ||
<p className='text-yellow-500'>with Tailwind CSS</p> | ||
<> | ||
<nav | ||
className='flex items-center justify-between flex-wrap p-6 rounded-lg mb-4' | ||
style={{ backgroundColor: 'rgb(54,188,238)' }} | ||
> | ||
<div className='flex items-center flex-shrink-0 text-white mr-4'> | ||
<img src='/logo.svg' style={{ height: 80 }} /> | ||
</div> | ||
{/* <div className="block lg:hidden"> | ||
<button className="flex items-center px-3 py-2 border rounded text-teal-200 border-teal-400 hover:text-white hover:border-white"> | ||
<svg className="fill-current h-3 w-3" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><title>Menu</title><path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"/></svg> | ||
</button> | ||
</div> */} | ||
<div className='w-full block flex-grow lg:flex lg:items-center lg:w-auto'> | ||
<div className='text-xl lg:flex-grow font-semibold'> | ||
<a | ||
href='/' | ||
className='block mt-4 lg:inline-block lg:mt-0 text-teal-200 hover:text-teal-100 mr-4' | ||
> | ||
Dashboard | ||
</a> | ||
<a | ||
href='/settings' | ||
className='block mt-4 lg:inline-block lg:mt-0 text-white hover:text-teal-200 mr-4' | ||
> | ||
Settings | ||
</a> | ||
</div> | ||
<div> | ||
<a | ||
onClick={() => console.log('Scan')} | ||
href='#' | ||
className='inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-teal-500 hover:bg-white mt-4 lg:mt-0' | ||
> | ||
Find my lifeinabox | ||
</a> | ||
</div> | ||
</div> | ||
</nav> | ||
<div className='grid grid-cols-3 gap-4'> | ||
<div className='p-4 shadow rounded bg-white text-center shadow-lg'></div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>logo</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import '../styles/index.css' | ||
|
||
export default () => ( | ||
<> | ||
<nav | ||
className='flex items-center justify-between flex-wrap p-6 rounded-lg mb-4' | ||
style={{ backgroundColor: 'rgb(54,188,238)' }} | ||
> | ||
<div className='flex items-center flex-shrink-0 text-white mr-4'> | ||
<img src='/logo.svg' style={{ height: 80 }} /> | ||
</div> | ||
{/* <div className="block lg:hidden"> | ||
<button className="flex items-center px-3 py-2 border rounded text-teal-200 border-teal-400 hover:text-white hover:border-white"> | ||
<svg className="fill-current h-3 w-3" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><title>Menu</title><path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"/></svg> | ||
</button> | ||
</div> */} | ||
<div className='w-full block flex-grow lg:flex lg:items-center lg:w-auto'> | ||
<div className='text-xl lg:flex-grow font-semibold'> | ||
<a | ||
href='/' | ||
className='block mt-4 lg:inline-block lg:mt-0 text-white hover:text-teal-200 mr-4' | ||
> | ||
Dashboard | ||
</a> | ||
<a | ||
href='/settings' | ||
className='block mt-4 lg:inline-block lg:mt-0 text-teal-200 hover:text-teal-100 mr-4' | ||
> | ||
Settings | ||
</a> | ||
</div> | ||
<div> | ||
<a className='inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-teal-500 hover:bg-white mt-4 lg:mt-0 opacity-50 cursor-not-allowed'> | ||
Find my lifeinabox | ||
</a> | ||
</div> | ||
</div> | ||
</nav> | ||
{/* <div className='grid grid-cols-3 gap-4'> | ||
<div className='p-4 shadow rounded bg-white text-center shadow-lg'> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>logo</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
<div className='p-4 shadow rounded bg-white text-center'> | ||
<h1 className='text-purple-500 leading-relaxed'>lifeinaweb</h1> | ||
</div> | ||
</div> */} | ||
</> | ||
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { createStore } from 'easy-peasy' // 👈 import | ||
import storeModel from '../model' | ||
|
||
export function initializeStore (initialState) { | ||
return createStore(storeModel, initialState) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters