Skip to content

Commit

Permalink
Merge pull request #8 from ryanwiemer/pretty
Browse files Browse the repository at this point in the history
Adding Prettier and Code Styling Clean Up
  • Loading branch information
ryanwiemer authored Jul 3, 2017
2 parents 1218729 + c941124 commit 789c5b9
Show file tree
Hide file tree
Showing 5 changed files with 235 additions and 111 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.scss]
indent_style = tab

[*.md]
trim_trailing_whitespace = false
7 changes: 7 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"*.js": [
"eslint",
"prettier --single-quote --trailing-comma es5 --write",
"git add"
]
}
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"build-css": "node-sass src/scss/style.scss src/style.css",
"watch-css": "npm run build-css && node-sass -w src/scss/style.scss src/style.css",
"start-js": "react-scripts start",
"precommit": "lint-staged",
"start": "npm-run-all -p watch-css start-js",
"build": "npm run build-css && react-scripts build",
"test": "react-scripts test --env=jsdom",
Expand All @@ -25,10 +26,13 @@
},
"dependencies": {
"react": "^15.5.4",
"react-dom": "^15.5.4"
"react-dom": "^15.5.4",
"react-text-mask": "^5.0.2",
"smoothscroll-polyfill": "^0.3.5",
"text-mask-addons": "^3.5.1"
},
"devDependencies": {
"eslint": "^3.0.1",
"eslint": "^3.19.0",
"eslint-config-react-app": "^1.0.4",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
Expand All @@ -37,9 +41,7 @@
"node-sass": "^4.5.3",
"npm-run-all": "^4.0.2",
"path": "^0.12.7",
"react-scripts": "1.0.7",
"react-text-mask": "^5.0.2",
"smoothscroll-polyfill": "^0.3.5",
"text-mask-addons": "^3.5.1"
"prettier": "^1.4.4",
"react-scripts": "1.0.10"
}
}
109 changes: 94 additions & 15 deletions src/components/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import React, { Component } from 'react';
require('smoothscroll-polyfill').polyfill();

class About extends Component {

scrollToAbout() {
document.querySelector('.about').scrollIntoView({
behavior: 'smooth'
behavior: 'smooth',
});
}

Expand All @@ -16,28 +15,108 @@ class About extends Component {
<button
className="button button--learn-more"
name="learn more"
onClick={this.scrollToAbout}>
onClick={this.scrollToAbout}
>
Learn More
</button>
<section id="about" className="about">
<h2 className="title title--h2">About</h2>
<p className="p p--about">The <em>Cal Factor Calculator</em> is a simple app intended to help Medtronic MiniMed insulin pump users calibrate their CGM sensors. Please note that the medical equipment itself is obviously more sophisticated and takes into account additional variables including your sensor's history. This app will help you calculate your &quot;cal factor&quot; and warn you about the most obvious of errors. To report an issue or request a feature please visit the <a href="https://github.com/ryanwiemer/cal-factor" target="_blank" rel="noopener noreferrer">GitHub repository</a>.</p>
<p className="p p--about">
The <em>Cal Factor Calculator</em> is a simple app intended to help
Medtronic MiniMed insulin pump users calibrate their CGM sensors.
Please note that the medical equipment itself is obviously more
sophisticated and takes into account additional variables including
your sensor&#39;s history. This app will help you calculate your
&quot;cal factor&quot; and warn you about the most obvious of
errors. To report an issue or request a feature please visit the{' '}
<a
href="https://github.com/ryanwiemer/cal-factor"
target="_blank"
rel="noopener noreferrer"
>
GitHub repository
</a>.
</p>
<h3 className="title title--h3">Calibration Factor Equation</h3>
<code><em>Cal Factor</em> = (Blood Glucose &divide; Interstitial Signal)</code>
<code>
<em>Cal Factor</em> = (Blood Glucose &divide; Interstitial Signal)
</code>
<h3 className="title title--h3">Useful Tips</h3>
<ul className="ul ul--about">
<li>Blood glucose must be between 40 - 400 or you will not be able to calibrate. <a href="https://www.medtronicdiabetes.com/customer-support/sensors-and-transmitters-support/calibration-sensor" target="_blank" rel="noopener noreferrer">(source)</a></li>
<li>Cal factor should be between 3 - 8 or the calibration will likely be rejected. </li>
<li>Wait at least 15 minutes between calibrations. <a href="https://www.medtronicdiabetes.com/customer-support/sensors-and-transmitters-support/troubleshoot-sensor" target="_blank" rel="noopener noreferrer">(source)</a></li>
<li>Do not calibrate if your blood glucose is rapidly rising or lowering. <a href="https://www.medtronicdiabetes.com/customer-support/sensors-and-transmitters-support/calibration-sensor" target="_blank" rel="noopener noreferrer">(source)</a></li>
<li>Your first couple of calibrations are the most important. Make sure these are very stable.</li>
<li>Hydration can potentially impact the accuracy of your ISIG value. Make sure you are not dehydrated when calibrating.</li>
<li>Experiences will vary from person to person. Although this app doesn't guarantee success hopefully it will help you avoid the unnecessary &quot;Cal Error&quot; warning.</li>
<li>
Blood glucose must be between 40 - 400 or you will not be able to
calibrate.{' '}
<a
href="https://www.medtronicdiabetes.com/customer-support/sensors-and-transmitters-support/calibration-sensor"
target="_blank"
rel="noopener noreferrer"
>
(source)
</a>
</li>
<li>
Cal factor should be between 3 - 8 or the calibration will likely
be rejected.
</li>
<li>
Wait at least 15 minutes between calibrations.{' '}
<a
href="https://www.medtronicdiabetes.com/customer-support/sensors-and-transmitters-support/troubleshoot-sensor"
target="_blank"
rel="noopener noreferrer"
>
(source)
</a>
</li>
<li>
Do not calibrate if your blood glucose is rapidly rising or
lowering.{' '}
<a
href="https://www.medtronicdiabetes.com/customer-support/sensors-and-transmitters-support/calibration-sensor"
target="_blank"
rel="noopener noreferrer"
>
(source)
</a>
</li>
<li>
Your first couple of calibrations are the most important. Make
sure these are very stable.
</li>
<li>
Hydration can potentially impact the accuracy of your ISIG value.
Make sure you are not dehydrated when calibrating.
</li>
<li>
Experiences will vary from person to person. Although this app
doesn&#39;t guarantee success hopefully it will help you avoid the
unnecessary &quot;Cal Error&quot; warning.
</li>
</ul>
<h3 className="title title--h3"><span className="emoji-icon" role="img" aria-label="Warning emoji">⚠️</span> Disclaimer</h3>
<p className="p p--about">This website is not intended to serve as formal medical advice. Please consult your doctor regarding your health. For specific technical assistance with your insulin pump or CGM sensor contact the device manufacture. This website is not in any way affiliated with Medtronic MiniMed.</p>
<h3 className="title title--h3">
<span className="emoji-icon" role="img" aria-label="Warning emoji">
⚠️
</span>{' '}
Disclaimer
</h3>
<p className="p p--about">
This website is not intended to serve as formal medical advice.
Please consult your doctor regarding your health. For specific
technical assistance with your insulin pump or CGM sensor contact
the device manufacture. This website is not in any way affiliated
with Medtronic MiniMed.
</p>
<h3 className="title title--h3">Last Updated</h3>
<p className="paragraph paragraph--about"> June, 2017. <a href="https://github.com/ryanwiemer/cal-factor/releases" target="_blank" rel="noopener noreferrer">(releases)</a></p>
<p className="paragraph paragraph--about">
June, 2017.{' '}
<a
href="https://github.com/ryanwiemer/cal-factor/releases"
target="_blank"
rel="noopener noreferrer"
>
(releases)
</a>
</p>
</section>
</div>
);
Expand Down
Loading

0 comments on commit 789c5b9

Please sign in to comment.