mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-02-17 04:24:20 +01:00
build(app): define webln type on window object
This commit is contained in:
@@ -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
3
src/global.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare interface Window {
|
||||
webln: any;
|
||||
}
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user