use{Service}{Action}.query.ts
import { QueryObserverOptions, useQuery } from '@tanstack/react-query';
import { DataShape } from '@/types/api';
import { DependencyList, useEffect } from 'react'; | |
export function useDebouncedEffect( | |
fn: () => void, | |
deps: DependencyList, | |
delay: number | |
) { | |
useEffect(() => { | |
const timer = setTimeout(() => { | |
fn(); |
Refactor from
const CustomLink: React.PropsWithChildren<CustomLinkProps> = ({
href,
as,
className,
children,
style = {},
...props
}) => {
export function downloadFileFromBlob(fileName: string, blob: Blob) { | |
const url = window?.URL?.createObjectURL(blob); | |
const link = document.createElement("a"); | |
link.style.display = "none"; | |
link.href = url; | |
link.setAttribute("download", fileName); | |
document.body.appendChild(link); | |
link.click(); | |
setTimeout(() => { | |
document.body.removeChild(link); |
open -a "Google Chrome" --args --disable-web-security --user-data-dir | |
open -a "Microsoft Edge" --args --disable-web-security --user-data-dir |
/((https?):\/\/)?(www.)?[a-z0-9]+(\.[a-z0-9]{1,}){1,3}(:[0-9])?(#?\/?[a-zA-Z0-9#_-]+)*\/?(\?[a-zA-Z0-9-_]+=[a-zA-Z0-9-%]+&?.*)?$/gm |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Declare new variable #jsbench #jsperf</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
Verifying my Blockstack ID is secured with the address 1G5KphvEmgjn8TUACct2BNdr4Sj7XhpyD https://explorer.blockstack.org/address/1G5KphvEmgjn8TUACct2BNdr4Sj7XhpyD |
{"lastUpload":"2020-04-10T07:44:40.507Z","extensionVersion":"v3.4.3"} |