Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am niyiao on github.
  • I am niyiao (https://keybase.io/niyiao) on keybase.
  • I have a public key ASAuN4B2KitKbZ9VlMdH7dwN8MldsiYh1A4-09b2Zn9tkQo

To claim this, I am signing this object:

@niyiAO
niyiAO / AuthRoutes.jsx
Last active October 29, 2021 12:16
Wise Account
<Route
path={ROUTES.wiseAccountDetails}
component={WiseAccountDetails}
/>
<Route
path={ROUTES.wiseAcctSuccess}
component={WiseAcctSuccess}
/>
@niyiAO
niyiAO / web.config
Last active October 6, 2021 17:37
SPA rewrites
<!-- IIS rewrite -->
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="SPA rewrite" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
@niyiAO
niyiAO / fetcher.ts
Last active October 4, 2021 07:27
drop in wrapper around fetch
export class ResponseError extends Error {
status: number;
statusText: string;
data: any;
constructor(message: string, data: any, response: Response) {
super(message);
this.status = response.status;
this.statusText = response.statusText;
this.data = data;