wip: migrate frontend to new backend

This commit is contained in:
2024-02-09 15:33:27 +07:00
parent ec78cf8bf7
commit 739ba63e6c
55 changed files with 351 additions and 933 deletions

View File

@@ -1,10 +0,0 @@
import { useContext } from "react";
import { ArkContext } from "../provider";
export const useArk = () => {
const context = useContext(ArkContext);
if (context === undefined) {
throw new Error("Please import Ark Provider to use useArk() hook");
}
return context;
};

View File

@@ -1,5 +1,5 @@
import { useQuery } from "@tanstack/react-query";
import { useArk } from "./useArk";
import { useArk } from "../provider";
export function useEvent(id: string) {
const ark = useArk();

View File

@@ -1,5 +1,5 @@
import { useQuery } from "@tanstack/react-query";
import { useArk } from "./useArk";
import { useArk } from "../provider";
export function useProfile(pubkey: string) {
const ark = useArk();

View File

@@ -1,5 +1,5 @@
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { useArk } from "./useArk";
import { useArk } from "../provider";
export function useRelaylist() {
const ark = useArk();