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 { useEffect, useState } from "react"; | |
import {Navbar, Nav, Form, Button, Table, Container, Modal} from 'react-bootstrap'; | |
import './App.css'; | |
import * as XLSX from "xlsx"; | |
import db from './firebase'; | |
function App() { | |
const [users, setUsers] = useState([]); | |
const [show, setShow] = useState(false); | |
const [headers, setHeaders] = useState([]); |
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 firebase from 'firebase' | |
const firebaseConfig = { | |
apiKey: process.env.REACT_APP_FIREBASE_API_KEY, | |
authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN, | |
databaseURL: process.env.REACT_APP_FIREBASE_DATABASE_URL, | |
projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID, | |
storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET, | |
messagingSenderId: process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID, | |
appId: process.env.REACT_APP_FIREBASE_APP_ID |
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
REACT_APP_FIREBASE_API_KEY = "XXXXXXXX" | |
REACT_APP_FIREBASE_AUTH_DOMAIN = "XXXXXXXX" | |
REACT_APP_FIREBASE_DATABASE_URL = "XXXXXXXX" | |
REACT_APP_FIREBASE_PROJECT_ID = "XXXXXXXX" | |
REACT_APP_FIREBASE_STORAGE_BUCKET = "XXXXXXXX" | |
REACT_APP_FIREBASE_MESSAGING_SENDER_ID = "XXXXXXXX" | |
REACT_APP_FIREBASE_APP_ID = "XXXXXXXX" |
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: "XXXXXXXX", | |
authDomain: "XXXXXXXX", | |
projectId: "XXXXXXXX", | |
storageBucket: "XXXXXXXX", | |
messagingSenderId: "XXXXXXXX", | |
appId: "XXXXXXXX", | |
measurementId: "XXXXXXXX" | |
}; |
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
npx create-react-app import-demo | |
cd import-demo | |
npm start |
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
<template> | |
<ul class="pagination"> | |
<li v-if="pagination.current_page > 1"> | |
<a href="javascript:void(0)" aria-label="Previous" v-on:click.prevent="changePage(pagination.current_page - 1)"> | |
<span aria-hidden="true">«</span> | |
</a> | |
</li> | |
<li v-for="page in pagesNumber" :class="{'active': page == pagination.current_page}"> | |
<a href="javascript:void(0)" v-on:click.prevent="changePage(page)">{{ page }}</a> | |
</li> |
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'; | |
export default class DataTable extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
entities: { | |
data: [], | |
meta: { |
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 DataTable from "./components/DataTable"; | |
export default class ReactDataTableApp extends Component { | |
constructor(props) { | |
super(props); | |
} | |
render() { | |
const columns = ['id', 'name', 'email', 'address', 'created_at']; |
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
$factory->define(App\User::class, function (Faker $faker) { | |
return [ | |
'name' => $faker->name, | |
'email' => $faker->unique()->safeEmail, | |
'email_verified_at' => now(), | |
'address' => $faker->address, | |
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret | |
'remember_token' => str_random(10), | |
]; | |
}); |
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
return [ | |
'id' => $this->id, | |
'name' => $this->name, | |
'email' => $this->email, | |
'address' => $this->address, | |
'created_at' => Carbon::parse($this->created_at)->toDayDateTimeString(), | |
]; |
NewerOlder