build(app): define webln type on window object

This commit is contained in:
Johns Beharry
2021-11-28 22:33:55 -06:00
parent 3bb7c18b15
commit 5af1fc7c96
3 changed files with 17 additions and 0 deletions

View File

@@ -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<ProjectCategory[]> {
let ALL_CATEGORIES = gql`
query GetCategories {
allCategories {
id
title
}
}
`;
console.log(ALL_CATEGORIES)
return data.categories;
}

3
src/global.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
declare interface Window {
webln: any;
}

View File

@@ -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({