Skip to content

Commit 376f171

Browse files
committed
set your own proxy
1 parent 1efa9c3 commit 376f171

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from './api';
22
export * from './ui';
3+
export { setProxyUrl } from './utils/proxify';

src/ui/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { PropsWithChildren } from 'react';
44
export const Button = ({
55
onClick,
66
disabled,
7-
variant,
7+
variant, //eslint-disable-line @typescript-eslint/no-unused-vars
88
children,
99
}: {
1010
onClick: () => void;

src/utils/proxify.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
const proxyUrl = 'https://proxy.dial.to';
1+
let proxyUrl = 'https://proxy.dial.to';
2+
3+
export function setProxyUrl(url: string) {
4+
proxyUrl = url;
5+
}
26

37
export function proxify(url: string) {
48
const proxifiedUrl = new URL(proxyUrl);

0 commit comments

Comments
 (0)