Skip to content

Instantly share code, notes, and snippets.

View iamashiqur's full-sized avatar

Ashiqur Rahman iamashiqur

View GitHub Profile
@iamashiqur
iamashiqur / usePagination.ts
Created December 10, 2024 06:57
Pagination hook for mange pagination
import { useState } from 'react'
const usePagination = (initialPage: number = 1, initialLimit: number = 10) => {
const [currentPage, setCurrentPage] = useState<number>(initialPage)
const [pageLimit, setPageLimit] = useState<number>(initialLimit)
const handlePageChange = (page: number) => {
setCurrentPage(page)
}
@iamashiqur
iamashiqur / InstaFeed.tsx
Created November 5, 2024 07:01
Instagram Feed Using INSTAGRAM ACCESS TOKEN
"use client";
import Image from "next/image";
import Link from "next/link";
import { useEffect, useState } from "react";
type InstagramPost = {
id: string;
caption: string;
media_url: string;
@iamashiqur
iamashiqur / customswiper.tsx
Last active October 24, 2024 07:11
Custom swiper slider with custom arrow
'use client'
import Image from 'next/image'
import SectionHeading from '../../components/SectionHeading'
import avatar from '/public/assets/avatar.jpeg'
// Import swiper/react
import { ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/16/solid'
import 'swiper/css'
import 'swiper/css/navigation'
import { Autoplay, Navigation } from 'swiper/modules'
@iamashiqur
iamashiqur / CountryCodes.json
Created April 4, 2024 04:02 — forked from anubhavshrimal/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@iamashiqur
iamashiqur / country-flag.json
Created March 23, 2024 07:59 — forked from pratikbutani/country-flag.json
A JSON for Country List with Flag Image
[
{
"flag": "https://twemoji.maxcdn.com/2/svg/1f1e6-1f1e8.svg",
"country": "Ascension Island",
"code": "ac"
},
{
"flag": "https://twemoji.maxcdn.com/2/svg/1f1e6-1f1e9.svg",
"country": "Andorra",
"code": "ad"