Skip to content

Commit

Permalink
feat: added slise host override
Browse files Browse the repository at this point in the history
  • Loading branch information
zlumer committed May 17, 2023
1 parent 9bb2fc0 commit 2658675
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/SliseAd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ export type SliseAdProps = {
format: string

style?: React.CSSProperties
__overrideSliseHost?: string
}

const DEFAULT_SLISE_HOST = "https://v1.slise.xyz"

export const SliseAd: React.FC<SliseAdProps> = props =>
{
const addSlot = React.useCallback(() =>
Expand All @@ -25,7 +28,7 @@ export const SliseAd: React.FC<SliseAdProps> = props =>
addSlot()
}, [addSlot])
const [_loading, _error] = useScript({
src: "https://v1.slise.xyz/scripts/embed.js",
src: `${props.__overrideSliseHost || DEFAULT_SLISE_HOST}/scripts/embed.js`,
checkForExisting: true,
async: true,
})
Expand Down

0 comments on commit 2658675

Please sign in to comment.