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 '@angular/core'; | |
import { AngularFireAuth } from '@angular/fire/auth'; | |
import { Router } from '@angular/router'; | |
import { CometChat } from '@cometchat-pro/chat'; | |
import { environment } from 'src/environments/environment'; | |
@Component({ | |
selector: 'app-login', | |
templateUrl: './login.component.html', | |
styleUrls: ['./login.component.css'], |
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
<div class="app"> | |
<div class="login-page"> | |
<div class="form"> | |
<img class="header__logo" src="/assets/logo.svg" alt="youtube logo" /> | |
<form | |
class="login-form" | |
class="login-form" | |
#loginForm="ngForm" | |
(ngSubmit)="submit(loginForm.value)" | |
> |
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 url(https://fonts.googleapis.com/css?family=Roboto:300); | |
.login-page { | |
width: 360px; | |
padding: 8% 0 0; | |
margin: auto; | |
} | |
.form { | |
position: relative; | |
z-index: 1; |
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 '@angular/core'; | |
import { AngularFireAuth } from '@angular/fire/auth'; | |
import { Router } from '@angular/router'; | |
import { CometChat } from '@cometchat-pro/chat'; | |
import { environment } from 'src/environments/environment'; | |
@Component({ | |
selector: 'app-register', | |
templateUrl: './register.component.html', | |
styleUrls: ['./register.component.css'], |
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 { NgModule } from '@angular/core'; | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { FormsModule } from '@angular/forms'; | |
import { AngularFireModule } from '@angular/fire'; | |
import { AngularFirestoreModule } from '@angular/fire/firestore'; | |
import { environment } from 'src/environments/environment'; | |
import { AppRoutingModule } from './app-routing.module'; | |
import { AppComponent } from './app.component'; | |
import { ChatComponent } from './chat/chat.component' |
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
<router-outlet></router-outlet> |
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 { NgModule } from '@angular/core'; | |
import { RouterModule, Routes } from '@angular/router'; | |
import { | |
AngularFireAuthGuard, | |
redirectUnauthorizedTo, | |
} from '@angular/fire/auth-guard'; | |
const redirectUnauthorizedToLogin = () => redirectUnauthorizedTo(['login']); | |
import { ChatComponent } from './chat/chat.component'; |
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
const firebaseConfig = { | |
apiKey: 'xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx', | |
authDomain: 'xxx-xxx-xxx-xxx-xxx-xxx-xxx', | |
databaseURL: 'xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx', | |
projectId: 'xxx-xxx-xxx', | |
storageBucket: 'xxx-xxx-xxx-xxx-xxx', | |
messagingSenderId: 'xxx-xxx-xxx', | |
appId: 'xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx', | |
measurementId: 'xxx-xxx-xxx', | |
}; |
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
// This file can be replaced during build by using the `fileReplacements` array. | |
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. | |
// The list of file replacements can be found in `angular.json`. | |
import { firebaseConfig, cometChat } from './../../app.config' | |
export const environment = { | |
production: false, | |
firebase: firebaseConfig, | |
...cometChat, | |
}; |
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 ReactDOM from "react-dom"; | |
import "./index.css"; | |
import App from "./App"; | |
ReactDOM.render(<App />, document.getElementById("root")); |