From 0809dd2b0c59176c86267dbfcd8e963fb0ac97ce Mon Sep 17 00:00:00 2001 From: Michael Winsauer Date: Fri, 18 Jan 2019 17:12:19 +0100 Subject: [PATCH] Add basic structure for website, and required dependencies --- service-website/package.json | 2 ++ service-website/public/index.html | 2 +- service-website/src/App.js | 23 +++++++----------- service-website/src/SearchTerms.js | 18 ++++++++++++++ service-website/src/SentimentAnalysis.js | 31 ++++++++++++++++++++++++ service-website/src/logo.svg | 7 ------ service-website/yarn.lock | 19 +++++++++++++-- 7 files changed, 78 insertions(+), 24 deletions(-) create mode 100644 service-website/src/SearchTerms.js create mode 100644 service-website/src/SentimentAnalysis.js delete mode 100755 service-website/src/logo.svg diff --git a/service-website/package.json b/service-website/package.json index a6ebbf5..602d91c 100644 --- a/service-website/package.json +++ b/service-website/package.json @@ -3,6 +3,8 @@ "version": "0.1.0", "private": true, "dependencies": { + "axios": "^0.18.0", + "prop-types": "^15.6.2", "react": "^16.7.0", "react-dom": "^16.7.0", "react-scripts": "2.1.3" diff --git a/service-website/public/index.html b/service-website/public/index.html index 943aba5..1e01fd4 100755 --- a/service-website/public/index.html +++ b/service-website/public/index.html @@ -22,7 +22,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`. --> - React App + Sentiment Analysis diff --git a/service-website/src/App.js b/service-website/src/App.js index cc42d19..a16fe71 100755 --- a/service-website/src/App.js +++ b/service-website/src/App.js @@ -1,25 +1,20 @@ import React, {Component} from 'react'; -import logo from './logo.svg'; import './App.css'; +import SentimentAnalysis from "./SentimentAnalysis"; class App extends Component { render() { return (
-
- logo -

- Edit src/App.js and save to reload. -

- - Learn React - +
+ Sentiment Analysis
+
+ +
+
+ G6T4 +
); } diff --git a/service-website/src/SearchTerms.js b/service-website/src/SearchTerms.js new file mode 100644 index 0000000..36ae4f7 --- /dev/null +++ b/service-website/src/SearchTerms.js @@ -0,0 +1,18 @@ +import React, {Component} from 'react'; +import PropTypes from 'prop-types'; + +class SearchTerms extends Component { + constructor(props, context) { + super(props, context); + } + + render() { + return null; + } +} + +SearchTerms.propTypes = { + terms: PropTypes.arrayOf(PropTypes.string), +}; + +export default SearchTerms; diff --git a/service-website/src/SentimentAnalysis.js b/service-website/src/SentimentAnalysis.js new file mode 100644 index 0000000..309d6e7 --- /dev/null +++ b/service-website/src/SentimentAnalysis.js @@ -0,0 +1,31 @@ +import React, {Component} from 'react'; +import SearchTerms from "./SearchTerms"; + +class SentimentAnalysis extends Component { + constructor(props, context) { + super(props, context); + this.state = { + terms: [], + }; + this.handleSubmit = this.handleSubmit.bind(this); + } + + handleSubmit(event) { + event.preventDefault(); + } + + render() { + return ( +
+ + + + + + ); + } +} + +SentimentAnalysis.propTypes = {}; + +export default SentimentAnalysis; diff --git a/service-website/src/logo.svg b/service-website/src/logo.svg deleted file mode 100755 index 6b60c10..0000000 --- a/service-website/src/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/service-website/yarn.lock b/service-website/yarn.lock index 14053ab..c391427 100644 --- a/service-website/yarn.lock +++ b/service-website/yarn.lock @@ -1532,6 +1532,14 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== +axios@^0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz#32d53e4851efdc0a11993b6cd000789d70c05102" + integrity sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI= + dependencies: + follow-redirects "^1.3.0" + is-buffer "^1.1.5" + axobject-query@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.0.1.tgz#05dfa705ada8ad9db993fa6896f22d395b0b0a07" @@ -4022,6 +4030,13 @@ follow-redirects@^1.0.0: dependencies: debug "=3.1.0" +follow-redirects@^1.3.0: + version "1.6.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.6.1.tgz#514973c44b5757368bad8bddfe52f81f015c94cb" + integrity sha512-t2JCjbzxQpWvbhts3l6SH1DKzSrx8a+SsaVf4h6bG4kOXUuPYS/kg2Lr4gQSb7eemaHqJkOThF1BGyjlUkO1GQ== + dependencies: + debug "=3.1.0" + for-in@^0.1.3: version "0.1.8" resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1" @@ -8041,7 +8056,7 @@ react-dev-utils@^7.0.1: strip-ansi "4.0.0" text-table "0.2.0" -react-dom@16.7.0: +react-dom@^16.7.0: version "16.7.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.7.0.tgz#a17b2a7ca89ee7390bc1ed5eb81783c7461748b8" integrity sha512-D0Ufv1ExCAmF38P2Uh1lwpminZFRXEINJe53zRAbm4KPwSyd6DY/uDoS0Blj9jvPpn1+wivKpZYc8aAAN/nAkg== @@ -8111,7 +8126,7 @@ react-scripts@2.1.3: optionalDependencies: fsevents "1.2.4" -react@16.7.0: +react@^16.7.0: version "16.7.0" resolved "https://registry.yarnpkg.com/react/-/react-16.7.0.tgz#b674ec396b0a5715873b350446f7ea0802ab6381" integrity sha512-StCz3QY8lxTb5cl2HJxjwLFOXPIFQp+p+hxQfc8WE0QiLfCtIlKj8/+5tjjKm8uSTlAW+fCPaavGFS06V9Ar3A== -- 2.43.0