This commit is contained in:
Artur Tamborski 2020-11-15 01:30:21 +01:00
parent c5dbc39cda
commit 5b3a051229
3 changed files with 28 additions and 15 deletions

View File

@ -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);
}
};

View File

@ -1,13 +1,14 @@
body { * {
box-sizing: border-box;
}
html, body {
margin: 0; margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif; sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

View File

@ -1,8 +1,9 @@
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import App from './components/App/App';
import './index.css'; import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
ReactDOM.render( ReactDOM.render(
<React.StrictMode> <React.StrictMode>
@ -10,8 +11,3 @@ ReactDOM.render(
</React.StrictMode>, </React.StrictMode>,
document.getElementById('root') 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();