Skip to content

Commit

Permalink
fix: fix init config minor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
RyukTheCoder authored and yeager-eren committed May 28, 2024
1 parent 2251e3b commit 7d671e3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { PropTypes } from './WidgetProvider.types';
import type { PropsWithChildren } from 'react';

import { setSolanaSignerConfig } from '@rango-dev/signer-solana';
import React, { useEffect } from 'react';
import React, { useEffect, useMemo } from 'react';

import { DEFAULT_BASE_URL, RANGO_PUBLIC_API_KEY } from '../../constants';
import useFontLoader from '../../hooks/useFontLoader';
Expand All @@ -24,7 +24,7 @@ export function WidgetProvider(props: PropsWithChildren<PropTypes>) {
}
}, [fontFamily]);

useEffect(() => {
useMemo(() => {
initConfig({
API_KEY: config?.apiKey || RANGO_PUBLIC_API_KEY,
BASE_URL: config?.apiUrl || DEFAULT_BASE_URL,
Expand Down

0 comments on commit 7d671e3

Please sign in to comment.