Skip to content

Commit

Permalink
Fix wrongly imported type
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgraeme committed Oct 15, 2024
1 parent 29d27ee commit 6e90dc9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/context/WllSdkContext.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Section } from '../types/section';
import { TSection } from '../types/section';
import { BaseThemeObject, ThemeContextType, ThemeObject } from '../types/theme';
import { Tile } from '../types/tile';
import { defaultTheme, sizes } from '../utils/styling';
Expand All @@ -22,7 +22,7 @@ type APIResponse<T> = {
};

type WllSdkContextType = ThemeContextType & {
getSectionByID: (id: string) => Promise<APIResponse<Section>>;
getSectionByID: (id: string) => Promise<APIResponse<TSection>>;
getTileByID: (id: string) => Promise<APIResponse<Tile>>;
};

Expand Down Expand Up @@ -81,7 +81,7 @@ export const WllSdkProvider: React.FC<WllSdkProviderProps> = ({
const makeRequest = async (
endpoint: string,
options: RequestInit = {}
): Promise<Tile | Section> => {
): Promise<Tile | TSection> => {
const { proxyEndpoint, baseUrl, apiKey } = config;
const url = `${proxyEndpoint || baseUrl}${endpoint}`;
const headers = new Headers(options.headers);
Expand Down

0 comments on commit 6e90dc9

Please sign in to comment.