Skip to content

Commit

Permalink
Code clean and github buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
jprodrigues70 committed Apr 25, 2021
1 parent 2f0a0c4 commit 12f636d
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 6 deletions.
2 changes: 2 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
3 changes: 0 additions & 3 deletions src/components/AnswerPane/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { Component } from "react";
import Suitable from "../Suitable";
import "./style.sass";
import analyser from "sentiment-ptbr";
import key from "../../plugins/key";
import AnswerClassifier from "../../plugins/AnswerClassifier";
import AnswerPrinter from "../../contracts/AnswerPrinter";
Expand Down
33 changes: 33 additions & 0 deletions src/components/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,39 @@ export default class Header extends Component {
<form ref={this.form}>
<FileUpload onChange={(event) => this.openFile(event)} />
</form>
<div className="c-header__right">
<a
className="github-button"
href="https://github.com/jprodrigues70/tsv-explorer"
data-color-scheme="no-preference: dark; light: dark; dark: dark;"
data-icon="octicon-star"
data-size="large"
data-show-count="true"
aria-label="Star jprodrigues70/tsv-explorer on GitHub"
>
Star
</a>
<a
className="github-button"
href="https://github.com/jprodrigues70/tsv-explorer/fork"
data-color-scheme="no-preference: dark; light: dark; dark: dark;"
data-icon="octicon-repo-forked"
data-size="large"
aria-label="Fork jprodrigues70/tsv-explorer on GitHub"
>
Fork
</a>
<a
className="github-button"
href="https://github.com/jprodrigues70/tsv-explorer/issues"
data-color-scheme="no-preference: dark; light: dark; dark: dark;"
data-icon="octicon-issue-opened"
data-size="large"
aria-label="Issue jprodrigues70/tsv-explorer on GitHub"
>
Issue
</a>
</div>
</header>
);
}
Expand Down
8 changes: 7 additions & 1 deletion src/components/Header/style.sass
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@
color: #2c3e50!important
&.v--dark
color: #f0f6fc !important

&__right
display: flex
gap: 8px
@media (max-width: 768px)
& > *
&:not(:first-child)
display: none
&__menu
&-toggle
@media (min-width: 769px)
Expand Down
1 change: 1 addition & 0 deletions src/components/Suitable/style.sass
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
&__header
display: flex
gap: 4px
flex-wrap: wrap
3 changes: 2 additions & 1 deletion src/plugins/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const color = {
return r * 0.299 + g * 0.587 + b * 0.114 > 186 ? darkColor : lightColor;
},
string2Hex(str) {
switch (str.toLowerCase()) {
const strLower = str.toLowerCase();
switch (strLower) {
case "positive":
return "#66c333";
case "negative":
Expand Down
1 change: 0 additions & 1 deletion src/store/database/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default database = {

delete local[payload];
localStorage.setItem("database", JSON.stringify(local));
const keys = Object.keys(local);

return commit("keys", Object.keys(local));
},
Expand Down

0 comments on commit 12f636d

Please sign in to comment.