Skip to content

Instantly share code, notes, and snippets.

View kishoreandra's full-sized avatar
🎯
Focusing - Learning responsive web design 😉

Kishore Kumar Andra kishoreandra

🎯
Focusing - Learning responsive web design 😉
View GitHub Profile
@kishoreandra
kishoreandra / fetchAPI.js
Created November 15, 2021 03:26
Reusbale fetch api with error handling
export async function fetchData(header, query, url) {
try {
const timeout = 8000;
const controller = new AbortController();
const id = setTimeout(() => controller.abort(), timeout);
const response = await fetch(url, {
method: "POST",
headers: { ...header },
body: JSON.stringify(query),
timeout: timeout,
@kishoreandra
kishoreandra / Carousel Code for reference
Last active October 22, 2021 14:03
carousel code for ref
@kishoreandra
kishoreandra / gist:ac7c7f6087a00e972178bbfcd65497ff
Created June 15, 2021 15:54
Best way of creating nested elements using JavaScript
<div class="carousel-item active">
<div class="row">
<div class="col-md-4 mb-3">
<div class="card">
<img class="img-fluid" alt="100%x280" src="https://images.unsplash.com/photo-1532781914607-2031eca2f00d?ixlib=rb-0.3.5&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=1080&amp;fit=max&amp;ixid=eyJhcHBfaWQiOjMyMDc0fQ&amp;s=7c625ea379640da3ef2e24f20df7ce8d">
<div class="card-body">
<h4 class="card-title">Special title treatment</h4>
<p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
<div class="form-group">