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
/* src/pages/Auth.css*/ | |
.auth { | |
width: 100%; | |
max-width: 500px; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
} |
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
// 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 |
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
// src/pages/Home.tsx | |
import React, { useState } from 'react'; | |
import { | |
Chat, | |
Channel, | |
ChannelHeader, | |
Thread, | |
Window, | |
ChannelList, |
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
// src/Customer.js | |
import React, { useState, useEffect } from "react"; | |
import { | |
Chat, | |
Channel, | |
Window, | |
TypingIndicator, | |
MessageList, | |
MessageCommerce, |
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
// src/Admin.js | |
import React, { useState, useEffect } from "react"; | |
import { | |
Chat, | |
Channel, | |
ChannelHeader, | |
Window, | |
MessageList, | |
ChannelList, |
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
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> |
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
// src/Customer.js | |
import React, { useState, useEffect } from "react"; | |
import { | |
Chat, | |
Channel, | |
Window, | |
TypingIndicator, | |
MessageList, | |
MessageCommerce, |
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
// 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'); |
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
// 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(); |
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
// src/App.js | |
import React, { useState, useEffect } from 'react'; | |
import './App.css'; | |
import { | |
Chat, | |
Channel, | |
ChannelHeader, | |
Thread, | |
Window, |