This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ClassValue, clsx } from 'clsx'; | |
import { twMerge } from 'tailwind-merge'; | |
export function cn(...inputs: ClassValue[]) { | |
return twMerge(clsx(inputs)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
type Props = React.ComponentProps<'input'> & {}; | |
export const NumericInput = React.forwardRef<HTMLInputElement, Props>( | |
({ className, onChange, ...props }, forwardedRef) => { | |
const handleInput = (event: React.ChangeEvent<HTMLInputElement>) => { | |
const numericValue = event.currentTarget.value.replace(/[^0-9]/g, ''); | |
event.currentTarget.value = numericValue; | |
if (onChange) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* GLOBALLY */ | |
* { | |
-ms-overflow-style: none; /* Internet Explorer 10+ */ | |
scrollbar-width: none; /* Firefox */ | |
} | |
*::-webkit-scrollbar { | |
display: none; /* Safari and Chrome */ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function isAndroid(): boolean { | |
return ( | |
typeof navigator !== 'undefined' && /android/i.test(navigator.userAgent) | |
); | |
} | |
export function isSmallIOS(): boolean { | |
return ( | |
typeof navigator !== 'undefined' && /iPhone|iPod/.test(navigator.userAgent) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Type definitions for React 18.2 | |
// Project: https://react.dev/ | |
// Definitions by: Asana <https://asana.com> | |
// AssureSign <http://www.assuresign.com> | |
// Microsoft <https://microsoft.com> | |
// John Reilly <https://github.com/johnnyreilly> | |
// Benoit Benezech <https://github.com/bbenezech> | |
// Patricio Zavolinsky <https://github.com/pzavolinsky> | |
// Eric Anderson <https://github.com/ericanderson> | |
// Dovydas Navickas <https://github.com/DovydasNavickas> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function App() { | |
return ( | |
<div | |
style={{ | |
height: "100vh", | |
display: "flex", | |
alignItems: "center", | |
justifyContent: "space-around", | |
}} | |
> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface CircularProgressProps { | |
progress: number; | |
size: number; | |
} | |
export const CircularProgress = ({ progress, size }: CircularProgressProps) => { | |
// Calculate the percentage of the size | |
const xPercentOfSize = (x: number) => (x / 100) * size; | |
const strokeWidth = xPercentOfSize(8); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Axios from "axios"; | |
import Router from "next/router"; | |
const API_URL = process.env.NEXT_PUBLIC_API_URL; | |
export const axios = Axios.create({ | |
baseURL: API_URL, | |
headers: { | |
"Content-Type": "application/json", | |
}, |