-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding eslint-plugin-jest as a dev. dependency; Beginning to fix ESLint
violations; Introducing support for i18n using i18n and react-i18next; Extending the Authorization Actions for creating and updating Authorization resources over REST; Introducing support for signing and verifying JSON Web Tokens for generating auth. tokens on the client-side; Providing adopters with the ability to specify a title for the app.; Implementing a GooglePickerTree component as an alternative to the ResourceTree for accessing Google Drive resources; Extending the UploadForm in order to handle the Google Picker authorization process; Adjusting styling (in response to integration testing the usage of a modal in a Rails application)
- Loading branch information
1 parent
30d6443
commit 7fcddcc
Showing
17 changed files
with
622 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
PORT=3333 | ||
REACT_APP_API_URL=http://localhost:3000/browse | ||
PORT=3001 | ||
REACT_APP_SECRET=$SECRET | ||
REACT_APP_GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID | ||
REACT_APP_GOOGLE_DEVELOPER_KEY=$GOOGLE_DEVELOPER_KEY | ||
REACT_APP_GOOGLE_SCOPE=https://www.googleapis.com/auth/drive.readonly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import i18n from "i18next" | ||
import { initReactI18next } from "react-i18next" | ||
|
||
const resources = { | ||
en: { | ||
translation: { | ||
"Browse Everything": "Browse Everything" | ||
} | ||
} | ||
} | ||
|
||
i18n | ||
.use(initReactI18next) // passes i18n down to react-i18next | ||
.init({ | ||
resources, | ||
lng: "en", | ||
|
||
keySeparator: false, // we do not use keys in form messages.welcome | ||
|
||
interpolation: { | ||
escapeValue: false // react already safes from xss | ||
} | ||
}) | ||
|
||
export default i18n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
import React, { Component } from 'react' | ||
import PropTypes from 'prop-types' | ||
import { Provider } from 'react-redux' | ||
import configureStore from '../configureStore' | ||
import App from './App' | ||
import './BrowseEverything.css' | ||
|
||
const store = configureStore() | ||
|
||
/** | ||
* Example of handler for updating the DOM once an upload has completed | ||
*/ | ||
const handleUpload = function(event) { | ||
console.log(event) | ||
} | ||
|
||
export default class BrowseEverything extends Component { | ||
class BrowseEverything extends Component { | ||
render() { | ||
return ( | ||
<Provider store={store}> | ||
<App onUpload={handleUpload} /> | ||
<App | ||
onUpload={this.props.handleUpload} | ||
title={this.props.title} | ||
/> | ||
</Provider> | ||
) | ||
} | ||
} | ||
|
||
BrowseEverything.propTypes = { | ||
handleUpload: PropTypes.func, | ||
title: PropTypes.string | ||
} | ||
|
||
export default BrowseEverything |
Oops, something went wrong.