Skip to content

Instantly share code, notes, and snippets.

View BerekHalfhand's full-sized avatar

Yuri Drobkov BerekHalfhand

  • Rightway Healthcare
  • Earth
View GitHub Profile
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"portfolio": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
import { Meteor } from 'meteor/meteor';
import { Roles } from 'meteor/alanning:roles';
export function onLogin() {
return (dispatch) => {
const loggingIn = Meteor.loggingIn();
const user = Meteor.user();
const userId = Meteor.userId();
const username = user && user.profile && user.profile.username && user.profile.username;
const fullname = user && user.profile && user.profile.fullname && user.profile.fullname;
@BerekHalfhand
BerekHalfhand / Profile.js
Last active August 8, 2018 01:39
Profile page
class Profile extends React.Component {
constructor(props) {
super(props)
autoBind(this)
}
profileReady(user) { //runs when the user data is loaded
if (this.props.feed.for != user.profile.username) {
this.props.feed.loading = true;
buildUserFeed({username: user.profile.username, accounts: user.accounts}) //outside method
.then((response) => {