diff --git a/src/api/index.ts b/src/api/index.ts index d68614e..e2b4404 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,7 +1,19 @@ import { Project, ProjectCard, ProjectCategory } from "../utils/interfaces"; +import { gql } from "@apollo/client"; import data from "./mockData.json"; export async function getAllCategories(): Promise { + let ALL_CATEGORIES = gql` + query GetCategories { + allCategories { + id + title + } + } + `; + + console.log(ALL_CATEGORIES) + return data.categories; } diff --git a/src/global.d.ts b/src/global.d.ts new file mode 100644 index 0000000..be05ea9 --- /dev/null +++ b/src/global.d.ts @@ -0,0 +1,3 @@ +declare interface Window { + webln: any; +} diff --git a/src/redux/features/wallet.slice.ts b/src/redux/features/wallet.slice.ts index 3d9732b..1781455 100644 --- a/src/redux/features/wallet.slice.ts +++ b/src/redux/features/wallet.slice.ts @@ -3,11 +3,13 @@ import { createSlice } from "@reduxjs/toolkit"; interface StoreState { isConnected: boolean; isLoading: boolean; + provider: any; } const initialState = { isConnected: false, isLoading: false, + provider: null, } as StoreState; export const walletSlice = createSlice({