diff --git a/src/helpers/localStore.ts b/src/helpers/localStore.ts index e69de29..173c010 100644 --- a/src/helpers/localStore.ts +++ b/src/helpers/localStore.ts @@ -0,0 +1,16 @@ +export function getData(key: string): string { + try { + return JSON.parse(localStorage.getItem(key) || ''); + } catch (err) { + console.error(`Error getting item ${key} from localStorage`, err); + } + return ''; +} + +export function setData(key: string, item: any): void { + try { + return localStorage.setItem(key, JSON.stringify(item)); + } catch (err) { + console.error(`Error storing item ${key} to localStorage`, err); + } +}; diff --git a/src/index.css b/src/index.css index ec2585e..6021fcc 100644 --- a/src/index.css +++ b/src/index.css @@ -1,13 +1,14 @@ -body { +* { + box-sizing: border-box; +} + +html, body { margin: 0; + padding: 0; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} diff --git a/src/index.tsx b/src/index.tsx index ef2edf8..6ad6df4 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,8 +1,9 @@ import React from 'react'; import ReactDOM from 'react-dom'; + +import App from './components/App/App'; + import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; ReactDOM.render( @@ -10,8 +11,3 @@ ReactDOM.render( , document.getElementById('root') ); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals();