Skip to content

Instantly share code, notes, and snippets.

View guptasanchit90's full-sized avatar
💻
Living at Work

Sanchit Gupta guptasanchit90

💻
Living at Work
View GitHub Profile
@guptasanchit90
guptasanchit90 / ImageUpload.js
Created July 9, 2020 12:53
Firebase Image upload with React bootstrap
import React, { useState, useEffect } from 'react';
import { Form, Image, ProgressBar } from 'react-bootstrap';
import { firebase } from '../../services/firebase';
import { v4 as uuidv4 } from 'uuid';
const ImageUpload = ({ onUpload, rootPath }) => {
const [imagePath, setImagePath] = useState(null);
const [imageUploadProgress, setImageUploadProgress] = useState(0);
useEffect(() => {
@guptasanchit90
guptasanchit90 / TableComponent.jsx
Created May 11, 2021 13:26
React bootstrap - Table and Client side Validation view
import PropTypes from "prop-types";
import React, { useEffect, useState } from "react";
import { Container, Pagination, Table } from "react-bootstrap";
import "./TableComponent.scss";
/**
*
* @param onRowSelect : When User clicks on a Row, send event back to parrent component with Row data
* @param rows : Array of Row Data
* @param cols : Array of Col Data