mirror of
https://github.com/hanzoai/sign.git
synced 2026-10-21 01:21:51 +00:00
The product is branded Hanzo eSign (esign.hanzo.ai, repo hanzoai/esign). Rename all workspace packages @hanzo/sign-* → @hanzo/esign-* (1052 files) and align docker/Dockerfile turbo --scope/--filter to the actual remix package name @hanzo/esign (was a pre-existing mismatch with -remix that broke the build). Protected deps (@hanzo/insights, @hanzo/logo) untouched.
17 lines
637 B
TypeScript
17 lines
637 B
TypeScript
import { NEXT_PUBLIC_WEBAPP_URL } from '@hanzo/esign-lib/constants/app';
|
|
|
|
/**
|
|
* getAssetBuffer is used to retrieve array buffers for various assets
|
|
* that are hosted in the `public` folder.
|
|
*
|
|
* This exists due to a breakage with `import.meta.url` imports and open graph images,
|
|
* once we can identify a fix for this, we can remove this helper.
|
|
*
|
|
* @param path The path to the asset, relative to the `public` folder.
|
|
*/
|
|
export const getAssetBuffer = async (path: string) => {
|
|
const baseUrl = NEXT_PUBLIC_WEBAPP_URL() || 'http://localhost:3000';
|
|
|
|
return fetch(new URL(path, baseUrl)).then(async (res) => res.arrayBuffer());
|
|
};
|