diff --git a/package.json b/package.json index 358c8777..045c613e 100644 --- a/package.json +++ b/package.json @@ -44,5 +44,8 @@ ] }, "homepage": "http://localhost:8080/react", - "license": "https://wisemapping.atlassian.net/wiki/spaces/WS/pages/524357/WiseMapping+Public+License+Version+1.0+WPL" + "license": "https://wisemapping.atlassian.net/wiki/spaces/WS/pages/524357/WiseMapping+Public+License+Version+1.0+WPL", + "dependencies": { + "@types/react-google-recaptcha": "^2.1.0" + } } diff --git a/packages/login/package.json b/packages/login/package.json index 9490cef9..89d00e66 100644 --- a/packages/login/package.json +++ b/packages/login/package.json @@ -1,58 +1,48 @@ { "name": "@wisemapping/login", "version": "0.1.3", - "main": "src/app.jsx", + "main": "app.jsx", "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", - "eject": "react-scripts eject", - "extract": "formatjs extract", - "compile": "formatjs compile" + "start": "webpack serve", + "build": "webpack --mode production", + "lint": "eslint src" + }, + "repository": "http://www.wisemapping.com", + "author": "Paulo Veiga , Ezequiel Bergamaschi ", + "license": "MIT", + "private": false, + "devDependencies": { + "@babel/preset-env": "^7.12.7", + "@babel/preset-react": "^7.12.7", + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", + "@types/react-router-dom": "^5.1.6", + "@typescript-eslint/eslint-plugin": "^4.8.1", + "@typescript-eslint/parser": "^4.8.1", + "babel-loader": "^8.2.2", + "clean-webpack-plugin": "^3.0.0", + "css-loader": "^5.0.1", + "eslint": "^7.14.0", + "eslint-plugin-react": "^7.21.5", + "eslint-plugin-react-hooks": "^4.2.0", + "html-webpack-plugin": "^4.5.0", + "sass-loader": "^10.1.0", + "style-loader": "^2.0.0", + "svg-url-loader": "^7.1.1", + "ts-loader": "^8.0.11", + "ts-node": "^9.0.0", + "typescript": "^4.1.2", + "url-loader": "^4.1.1", + "webpack": "^5.6.0", + "webpack-cli": "^4.2.0", + "webpack-dev-server": "^3.11.0" }, "dependencies": { "axios": "^0.21.0", - "cors": "^2.8.5", - "joi": "^17.3.0", "react": "^17.0.1", "react-dom": "^17.0.1", - "react-google-recaptcha": "^2.1.0", - "react-intl": "^5.10.5", - "web-vitals": "^0.2.4", - "chokidar": "^3.4.3" - }, - "devDependencies": { - "@formatjs/cli": "^2.13.14", - "@testing-library/jest-dom": "^5.11.6", - "@testing-library/react": "^11.2.2", - "@testing-library/user-event": "^12.2.2", - "react-scripts": "4.0.1" - }, - "author": { - "name": "Paulo Veiga", - "login.email": "pveiga@wisemapping.com" - }, - "contributors": [ - "Ezequiel Bergamaschi" - ], - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "homepage": "http://localhost:8080/react", - "license": "https://wisemapping.atlassian.net/wiki/spaces/WS/pages/524357/WiseMapping+Public+License+Version+1.0+WPL" + "react-intl": "^5.10.6", + "react-recaptcha-v3": "^2.0.1", + "react-router-dom": "^5.2.0" + } } \ No newline at end of file diff --git a/packages/login/src/Footer.jsx b/packages/login/src/Footer.jsx deleted file mode 100644 index 46f81963..00000000 --- a/packages/login/src/Footer.jsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import { FormattedMessage } from 'react-intl' -import { ReactComponent as SvgLogo } from './images/logo-text.svg' - -class Footer extends React.Component { - render() { - return ( -
- {/* FIXME: we have to unify the way we load SVGs */} -
- - - -
-
- - -
< a href="mailto:feedback@wisemapping.com" >
-
-
-
< a href="https://www.paypal.com/webapps/shoppingcart?flowlogging_id=c7ac923b53025&mfid=1606520600355_c7ac923b53025#/checkout/openButton">< FormattedMessage id="footer.donations" defaultMessage="PayPal Donations" />
-
-
- ) - }; -} - -export default Footer; diff --git a/packages/login/src/Footer.tsx b/packages/login/src/Footer.tsx new file mode 100644 index 00000000..e0b19a2a --- /dev/null +++ b/packages/login/src/Footer.tsx @@ -0,0 +1,26 @@ +import React from 'react'; +import { FormattedMessage } from 'react-intl' +// import { ReactComponent as SvgLogo } from './images/logo-text.svg' + +const Footer = () => { + return ( +
+ {/* FIXME: we have to unify the way we load SVGs */} +
+ + + +
+
+ + +
< a href="mailto:feedback@wisemapping.com" >
+
+
+
< a href="https://www.paypal.com/webapps/shoppingcart?flowlogging_id=c7ac923b53025&mfid=1606520600355_c7ac923b53025#/checkout/openButton">< FormattedMessage id="footer.donations" defaultMessage="PayPal Donations" />
+
+
+ ) +} + +export default Footer; diff --git a/packages/login/src/Header.jsx b/packages/login/src/Header.tsx similarity index 58% rename from packages/login/src/Header.jsx rename to packages/login/src/Header.tsx index d9938527..96d0774c 100644 --- a/packages/login/src/Header.jsx +++ b/packages/login/src/Header.tsx @@ -1,13 +1,16 @@ import React from 'react'; import { FormattedMessage } from 'react-intl' -import logo from './images/header-logo.png' -class Header extends React.Component { - constructor(props) { +//const logo = require('./images/header-logo.png') + +interface HeaderProps { + type: string; +} + +class Header extends React.Component { + constructor(props: HeaderProps) { super(props); - this.state = { - type: props.type - }; + this.state = props; } render() { @@ -23,14 +26,14 @@ class Header extends React.Component { text = ; signUpButton = ; } else { - signUpButton = - signInButton = ; + signUpButton = + signInButton = ; } return (