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 from 'react'; | |
import { Provider } from 'react-redux'; | |
import { Router, AndroidBackButton } from 'react-router-native'; | |
import { StyleProvider } from '@shoutem/theme'; | |
/* Local components */ | |
import StoredSession from 'src/components/connected/StoredSession'; | |
import NotifiableDevice from 'src/components/connected/NotifiableDevice'; | |
import Routes from 'src/routes'; |
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 config from 'src/config'; | |
export default axios.create({ | |
baseURL: config.apiBaseUrl, | |
timeout: 3000, | |
headers: { | |
'content-type': 'application/json' | |
} | |
}); |
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 { connect } from 'react-redux'; | |
import HOCPrivateRoute from 'src/components/utility/PrivateRoute'; | |
function mapStateToProps(state) { | |
return { | |
authenticated: state.auth.authenticated, | |
redirectTo: '/welcome' | |
}; | |
} |
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, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
const Loading = (Wrapped, action) => class extends Component { | |
static propTypes = { | |
action: PropTypes.func | |
} | |
static defaultProps = { | |
action: false |
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 { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import { withRouter } from 'react-router-native'; | |
const HistoryListener = class extends Component { | |
static propTypes = { | |
history: PropTypes.object.isRequired, | |
callback: PropTypes.func.isRequired, | |
delay: PropTypes.number | |
} |
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
module Users | |
class Profile < ApplicationRecord | |
include ::Calculator::Profile # Let anything with this act as a profile? | |
end | |
end | |
module Trends | |
class Profile < ApplicationRecord | |
include ::Calculator::Profile # And if we need ad-hoc profiles, | |
# make classes for them |
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
module EntityChangeCallbacks | |
extend ActiveSupport::Concern | |
# This concern allows us to treat lists of entity | |
# attributes as a unit, with their own create and update | |
# callbacks. | |
# | |
# | |
# create_change_callback name: :profile, | |
# attributes: [ |
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
# Set the host name for URL creation | |
protocol = ENV['PROTOCOL'] || 'http' | |
SitemapGenerator::Sitemap.default_host = "#{protocol}://#{ENV['HOST']}" | |
SitemapGenerator::Sitemap.compress = false | |
SitemapGenerator::Sitemap.create do | |
add('/topics') | |
add('/concepts') |
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
# https://github.com/airbrake/airbrake-ruby#configuration | |
Airbrake.configure do |c| | |
# You must set both project_id & project_key. To find your project_id and | |
# project_key navigate to your project's General Settings and copy the values | |
# from the right sidebar. | |
# https://github.com/airbrake/airbrake-ruby#project_id--project_key | |
c.project_id = 'xxxx' | |
c.project_key = 'xxxxxxxxxxx' | |
c.root_directory = Rails.root | |
c.logger = Rails.logger |
NewerOlder