7 lines
223 B
TypeScript
7 lines
223 B
TypeScript
export const generateXPostText = (path: string, text: string) => {
|
|
const url = new URL('https://x.com/intent/tweet');
|
|
url.searchParams.set('url', path);
|
|
url.searchParams.set('text', text);
|
|
return url.toString();
|
|
};
|