Skip to content

Commit

Permalink
Various
Browse files Browse the repository at this point in the history
  • Loading branch information
nuuuwan committed Jul 30, 2024
1 parent 52461e8 commit 0ca9fc4
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="https://nuuuwan.github.io/candidates" />
<meta name="twitter:title" content="Politicians" />
<meta name="twitter:title" content="Candidates" />
<meta name="twitter:description" content="Sri Lankan Political Candidates & Critera for selecting them" />

<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
Expand All @@ -35,7 +35,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Politicians</title>
<title>Candidates</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "Politicians",
"name": "Politicians",
"short_name": "Candidates",
"name": "Candidates",
"icons": [
{
"src": "favicon.ico",
Expand Down
15 changes: 13 additions & 2 deletions src/nonview/core/Weight.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,22 @@ export default class Weight {
}
static getDirectionText(weight) {
if (weight > 0) {
return "Suitable " + Weight.EMOJI.SUITABLE;
return "Suitable";
}

if (weight < 0) {
return "Unsuitable " + Weight.EMOJI.UNSUITABLE;
return "Unsuitable";
}
return "";
}

static getDirectionEmoji(weight) {
if (weight > 0) {
return Weight.EMOJI.SUITABLE;
}

if (weight < 0) {
return Weight.EMOJI.UNSUITABLE;
}
return Weight.EMOJI.NEUTRAL;
}
Expand Down
3 changes: 1 addition & 2 deletions src/view/molecules/VersionMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import CategoryIcon from "@mui/icons-material/Category";
import { t } from "../../nonview/base/I18N";
import GroundTruth from "../../nonview/core/GroundTruth";

const MESSAGE =
"Hi Nuwan, I'd like to submit criteria for the PoliticiansLKApp";
const MESSAGE = "Hi Nuwan, I'd like to submit criteria for the CandidatesLKApp";
const URL_MESSAGE =
"https://twitter.com/messages/compose?recipient_id=57874373&text=" +
MESSAGE.replace(" ", "+");
Expand Down
4 changes: 3 additions & 1 deletion src/view/molecules/WeightView.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export default function WeightView({ weight }) {
{t(Weight.getMagnitudeText(weight))}
</Typography>
<Typography variant="caption">
{t(Weight.getDirectionText(weight))}
{t(Weight.getDirectionText(weight)) +
" " +
Weight.getDirectionEmoji(weight)}
</Typography>
</Stack>
);
Expand Down

0 comments on commit 0ca9fc4

Please sign in to comment.