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, { Component } from 'react'; | |
import newsData from './../services/news'; | |
import ReactHtmlParser from 'react-html-parser'; | |
import { Link } from 'react-router-dom'; | |
class news extends Component { | |
data; | |
constructor(props) { | |
super(props); | |
this.state = { |
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, { Component } from 'react'; | |
import ReactQuill from 'react-quill'; | |
import 'react-quill/dist/quill.snow.css'; | |
import './../CSS/addnews.css'; | |
import newsData from './../services/news'; | |
import { Link } from 'react-router-dom'; | |
class addnews extends Component { | |
constructor(props) { | |
super(props); |
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, { Component } from 'react'; | |
import { Link } from 'react-router-dom'; | |
import './../CSS/dashboard.css'; | |
class dashboard extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
}; | |
this.logout = this.logout.bind(this); |
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, { Component } from 'react'; | |
import authentication from './../services/authentication'; | |
import { Link } from 'react-router-dom'; | |
import './../App.css'; | |
import './../CSS/login.css'; | |
class login extends Component { | |
returnedData; | |
constructor(props) { |
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 config = { | |
bucket_name: "react-pwa", | |
bucket_slug: "react-pwa", | |
bucket_id: "YOUR COSMIC BUCKET_ID", | |
read_key: "YOUR COSMIC READ_KEY", | |
write_key: "YOUR COSMIC WRITE_KEY", | |
url: "https://api.cosmicjs.com/v1/" | |
} |
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, OnInit } from '@angular/core'; | |
import { Router } from '@angular/router'; | |
@Component({ | |
selector: 'app-dashboard', | |
templateUrl: './dashboard.component.html', | |
styleUrls: ['./dashboard.component.css'] | |
}) | |
export class DashboardComponent implements OnInit { | |
currentUser: any; |
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, OnInit } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
import { FormBuilder, FormGroup, FormControl, Validators } from '@angular/forms'; | |
import { ApicallService } from './../../services/apicall.service'; | |
import { Router } from '@angular/router'; | |
import { | |
AuthService, | |
GoogleLoginProvider, | |
} from 'angular-6-social-login-v2'; |
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, OnInit } from '@angular/core'; | |
import { FormBuilder, FormGroup, FormControl, Validators } from '@angular/forms'; | |
import { userModel } from './../../models/user.model'; | |
import { Router } from '@angular/router'; | |
import { ApicallService } from './../../services/apicall.service'; | |
@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
export class userModel { | |
_id: string; | |
fullName: string; | |
email: string; | |
password: string; | |
confirmPassword: string; | |
gender: string; | |
mobile: string; |
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 { Injectable } from '@angular/core'; | |
import { config } from './../../config/cosmic.config'; | |
import { Http } from '@angular/http'; | |
import { userModel } from './../models/user.model'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class ApicallService { |