Skip to content

Instantly share code, notes, and snippets.

View ayoisaiah's full-sized avatar
💪
Getting after it

Ayooluwa Isaiah ayoisaiah

💪
Getting after it
View GitHub Profile
/* src/pages/Auth.css*/
.auth {
width: 100%;
max-width: 500px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
// src/pages/Home.tsx
import React, { useState } from 'react';
import axios from 'axios';
import Auth from './Auth';
function useInput(type: string) {
const [value, setValue] = useState('');
const input = (
<input
// src/pages/Home.tsx
import React, { useState } from 'react';
import {
Chat,
Channel,
ChannelHeader,
Thread,
Window,
ChannelList,
// src/Customer.js
import React, { useState, useEffect } from "react";
import {
Chat,
Channel,
Window,
TypingIndicator,
MessageList,
MessageCommerce,
// src/Admin.js
import React, { useState, useEffect } from "react";
import {
Chat,
Channel,
ChannelHeader,
Window,
MessageList,
ChannelList,
STREAM_API_KEY=<your stream api key>
STREAM_APP_SECRET=<your stream app secret>
MAILGUN_DOMAIN=<your mailgun domain>
MAILGUN_API_KEY=<your mailgun private key>
// src/Customer.js
import React, { useState, useEffect } from "react";
import {
Chat,
Channel,
Window,
TypingIndicator,
MessageList,
MessageCommerce,
// server.js
require("dotenv").config();
const express = require("express");
const cors = require("cors");
const bodyParser = require("body-parser");
const { StreamChat } = require("stream-chat");
const nodemailer = require('nodemailer');
const mg = require('nodemailer-mailgun-transport');
@ayoisaiah
ayoisaiah / server.js
Last active February 7, 2020 10:46
server.js
// server.js
require('dotenv').config();
const express = require('express');
const cors = require('cors');
const bodyParser = require('body-parser');
const { StreamChat } = require('stream-chat');
const app = express();
@ayoisaiah
ayoisaiah / App.js
Last active January 29, 2021 02:40
// src/App.js
import React, { useState, useEffect } from 'react';
import './App.css';
import {
Chat,
Channel,
ChannelHeader,
Thread,
Window,