Skip to content

Instantly share code, notes, and snippets.

View jermsam's full-sized avatar
🎯
Focusing

Samson Ssali jermsam

🎯
Focusing
View GitHub Profile
@jermsam
jermsam / signin.js
Created April 29, 2019 19:01
whats wrong with doAuth ... fails to build when i include it
import React,{Component} from 'react'
import { Grid, Header, Image, Divider, Loader } from 'semantic-ui-react';
import { withRouter } from 'next/router'
import Validator from 'validator';
import Layout from './layout';
import SigninForm from './forms/SigninForm';
import { app } from '../feathers';
const validate = values => {
const errors = [];
@jermsam
jermsam / Searchbrom.js
Last active April 28, 2019 19:18
File Causing build errors
/* eslint-disable no-console */
import React, { Component } from 'react';
import _ from 'lodash';
import { Search } from 'semantic-ui-react';
import { Router } from '../../routes';
import { app } from '../../feathers';
export default class StudentSearch extends Component {
<blockquote class="imgur-embed-pub" lang="en" data-id="a/QsUhSnv" data-context="false"><a href="//imgur.com/QsUhSnv"></a></blockquote><script async src="//s.imgur.com/min/embed.js" charset="utf-8"></script>
import _ from 'lodash';
/* eslint-disable no-console */
import React, { Component } from 'react';
import { Form, Search } from 'semantic-ui-react';
import YTSearch from 'youtube-api-search';
import moment from 'moment';
// import { app } from '../../feathers';
const { API_KEY } = process.env;
import React from 'react';
import App, { Container } from 'next/app';
import NextSeo from 'next-seo';
import 'semantic-ui-css/semantic.min.css';
import 'react-dropzone-component/styles/filepicker.css';
import 'react-toastify/dist/ReactToastify.css';
import 'dropzone/dist/min/dropzone.min.css';
import 'react-image-crop/dist/ReactCrop.css';
import 'react-datepicker/dist/react-datepicker.css';
import { loadReCaptcha } from 'react-recaptcha-google';
import React from 'react';
import { app, bucket } from './feathers';
/* eslint-disable no-console */
const AuthContext = React.createContext();
class AuthProvider extends React.Component {
state = {
authUser: null
import React, { Component } from 'react';
import { Grid, Container } from 'semantic-ui-react';
import PrivateLayout from './layouts/PrivateLayout';
import { app } from '../feathers';
import ApplyForAUserCategory from './components/ApplyForAUserCategory';
import SuperUserMenu from './superuser/SuperUserMenu';
import JoinVillage from './components/JoinVillage';
import ProvideFALicense from './fa/ProvideFALicense';
import FADashboard from './fa/FADashboard';
Below is the explanation that would accompany that diagram... (hope it answers all preceding questions)
... 1st and foremost, I am planning to use both subscriptions and one time checkout ....
My implementation:
1. I am storing info about students in my database (i do not intend to put money on students bank accounts and so they are not direct stripe customers). The information I am storing for students include the goal (the total amount they want to collect-our threshold if you may call it) and the collection (of how much money has been donated to that specific student's campaign) as such, no card information is required from students.
2. then we have donors (which could include any one on earth) ... I am not storing any of their information yet in the database according to my current implementation. As such, they do not have to log in (they can donate anonymously). All they do is go to the students profile and find a donate button to click on. When they do, a checkout form pops up to collect the donors car
@jermsam
jermsam / _app.js
Last active March 27, 2019 18:07
trouble implementing seo correctly in next.js app using next-seo
import React from 'react';
import App, { Container } from 'next/app';
import NextSeo from 'next-seo';
import 'semantic-ui-css/semantic.min.css';
import 'react-dropzone-component/styles/filepicker.css';
import 'react-toastify/dist/ReactToastify.css';
import 'dropzone/dist/min/dropzone.min.css';
import 'react-image-crop/dist/ReactCrop.css';
import 'react-datepicker/dist/react-datepicker.css';
import { loadReCaptcha } from 'react-recaptcha-google';
@jermsam
jermsam / error.log
Last active March 22, 2019 12:54
Authentication Bug With Gmail Api Oauth2.
error: Error: Mail command failed: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/?p=WantAuthError m17sm5782308pff.170 - gsmtp
at SMTPConnection._formatError (C:\Users\JITPOMI\code\chat-app\chat-s\node_modules\feathers-mailer\node_modules\nodemailer\lib\smtp-connection\index.js:605:19)
at SMTPConnection._actionMAIL (C:\Users\JITPOMI\code\chat-app\chat-s\node_modules\feathers-mailer\node_modules\nodemailer\lib\smtp-connection\index.js:1370:34)
at SMTPConnection._responseActions.push.str (C:\Users\JITPOMI\code\chat-app\chat-s\node_modules\feathers-mailer\node_modules\nodemailer\lib\smtp-connection\index.js:857:18)
at SMTPConnection._processResponse (C:\Users\JITPOMI\code\chat-app\chat-s\node_modules\feathers-mailer\node_modules\nodemailer\lib\smtp-connection\index.js:764:20)
at SMTPConnection._onData (C:\Users\JITPOMI\code\chat-app\chat-s\node_modules\feathers-mailer\node_modules\nodemailer\lib\smtp-connection\index.js:570:14)
at TLSSocket._so