Skip to content

Instantly share code, notes, and snippets.

View Maverick2502's full-sized avatar
🎯
Thriving...

Nurullo Maverick2502

🎯
Thriving...
View GitHub Profile
@Maverick2502
Maverick2502 / axiosCongfig.js
Last active March 17, 2023 15:52
Creating axios config with JWT for sending requests. Which will be used later in all other requests in which we need token. ----- In users.js we have Redux. 1. changeUser - we use for onChange 2. updateUsers - to store received data from our request which will place list of users in our user's array. 3. resetState - to clean entered values 4. ge…
import { Modal } from "antd";
import axios from "axios";
import jwt_decode from "jwt-decode";
axios.defaults.baseURL = process.env.REACT_APP_BASE_YOUR_URL;
export const axiosConfig = axios.create();
function getTokens() {
@Maverick2502
Maverick2502 / Button.component.tsx
Last active March 17, 2023 15:12
Custom button component
import classNames from "classnames";
import React from "react";
import classes from "./button.module.scss";
interface ButtonProps {
children: React.ReactNode;
isSubmit?: boolean;
disabled?: boolean;
className?: string;
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Maverick2502
Maverick2502 / name.js
Created December 16, 2020 12:02 — forked from tkon99/name.js
Random Name Generator for Javascript
/*
(c) by Thomas Konings
Random Name Generator for Javascript
*/
function capFirst(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
function getRandomInt(min, max) {