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
import React, { useEffect, useState, Fragment } from "react"; | |
import Chart from 'react-google-charts' | |
import { connect} from "react-redux"; | |
import {trendData, getTrending} from './actions/data' | |
import {PropTypes} from 'prop-types' | |
import loading from './loading.gif' | |
import Dropdown from 'react-dropdown'; | |
import 'react-dropdown/style.css'; | |
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
import axios from 'axios' | |
import * as RNLocalize from "react-native-localize"; | |
// const domain = "http://localhost:3001" | |
const domain = "https:apigoogletrends.herokuapp.com" | |
export const trendData = (trend1, trend2) => async (dispatch) => { | |
try { | |
dispatch({ | |
type: 'SENDING' | |
}) | |
console.log('dispatched') |
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
const initialState = { | |
result: [ | |
[] | |
], | |
sending: false, | |
keyArr: [], | |
dailyTrending: false | |
}; | |
export default function(state = initialState, action) { |
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
const brain = require('brain.js') | |
const data = require('./data') | |
const express = require('express') | |
var app = express() | |
const cors = require('cors') | |
app.use(cors()) | |
var trainingData = [] | |
var maxClose = Math.max.apply(Math, data.map(function(o) { | |
return o.Close | |
})); |
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
import React,{useState} from 'react'; | |
import logo from './logo.svg'; | |
import axios from 'axios' | |
import './App.css'; | |
function App() { | |
const[data,setData] = useState({ | |
flag:false, | |
result:'' |
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
import React,{useEffect, useState} from 'react'; | |
import logo from './logo.svg'; | |
import axios from 'axios' | |
import './App.css'; | |
function App() { | |
const[data,setData] = useState({ | |
flag:false, | |
result:'' |
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
import React,{useEffect, useState} from 'react'; | |
import logo from './logo.svg'; | |
import axios from 'axios' | |
import './App.css'; | |
function App() { | |
const[data,setData] = useState({ | |
flag:false, | |
result:'' |
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
const brain = require('brain.js') | |
const data = require('./data') | |
const express = require('express') | |
var app = express() | |
const cors = require('cors') | |
app.use(cors()) | |
var trainingData = [] | |
var testingData = [] | |
var maxClose = Math.max.apply(Math, data.map(function(o) { | |
return o.Close |
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
import AWS from 'aws-sdk' | |
import S3 from 'react-aws-s3'; | |
const path = require("path") | |
const S3Encode = require("s3encode").default | |
const S3_BUCKET = process.env.REACT_APP_BUCKET_NAME; | |
const REGION = process.env.REACT_APP_AWS_S3_REGION; | |
AWS.config.update({ |
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
{ | |
"Version": "2012-10-17", | |
"Id": "Policy1618249237358", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1618249235135", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:*", | |
"Resource": "arn:aws:s3:::bucket-name/*", |