Skip to content

Instantly share code, notes, and snippets.

View erkobridee's full-sized avatar

Erko Bridee erkobridee

View GitHub Profile
import * as React from 'react';
export interface ComponentNameProps {
className?: string;
// other properties
}
export const ComponentName: React.FunctionComponent<ComponentNameProps> = ({ className }) => {
// internal logic
import * as React from 'react';
import { useRouter } from 'next/router';
//----------------------------------------------------------------------------//
const isBrowser = window !== undefined;
type Gtag = (...args: any[]) => void;
export interface IGoogleAnalyticsPageView {
// Type level bubble sort algorithm
// https://twitter.com/anuraghazra
type BubbleSort<
A extends any[],
Curr extends number = A["length"]
> = Curr extends 1
? A
: A extends [infer F, infer S, ...infer Rest]
? BubbleSort<
@erkobridee
erkobridee / git_commit_messages.md
Created April 4, 2022 10:25
git commit message pattern that I follow

Git Commit Messages

about the commit messages used, it follows the pattern

{TICKED ID} {type}(optional scope): short description

optional body

optional footer

useful tools to generate fake or do mock data

Fake Image

@erkobridee
erkobridee / _functions-overloads.md
Last active March 16, 2022 14:30
simple example of how to define functions overloads on typescript

Good morning 🇺🇸 / Bom Dia 🇧🇷 / Buenos Dias 🇪🇸 / Bonjour 🇫🇷 / Buongiorno 🇮🇹 / Gudde Moien 🇱🇺 / Guten Morgen 🇩🇪 / Ohayōgozaimasu ( おはようございます ) 🇯🇵 / Zǎoshang hǎo ( 早上好 ) 🇨🇳

@erkobridee
erkobridee / charts.md
Last active March 14, 2022 09:43
chart libraries