Skip to content

Commit

Permalink
fix(icon): remove signal and urlPrefixContext
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Sep 20, 2023
1 parent 87590d1 commit 1344742
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/icon/src/preload.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import {fetch} from '@alwatr/fetch';
import {contextConsumer} from '@alwatr/signal';

const urlPrefixContext = contextConsumer.bind<string>('icon-url-prefix');

export async function preloadIcon(name: string): Promise<string> {
const urlPrefix = urlPrefixContext.getValue() ?? 'https://cdn.jsdelivr.net/npm/@alwatr/icon@0/svg/';
const urlPrefix = 'https://cdn.jsdelivr.net/npm/@alwatr/icon@1/svg/';
const url = urlPrefix + name + '.svg';

const response = await fetch({
Expand Down

0 comments on commit 1344742

Please sign in to comment.