A Prediction Market on the AT Protocol

fix(providers/cumulus-provider.tsx): set treaty origin to window.location

Ciaran e18518fe a836b6a2

+4 -2
+4 -2
src/web/providers/cumulus-provider.tsx
··· 1 - import { treaty, type Treaty } from "@elysiajs/eden" 1 + import { treaty } from "@elysiajs/eden" 2 2 import { createContext, type PropsWithChildren } from "react"; 3 3 import { useAuth } from "./useAuth"; 4 4 import { useQuery, type UseQueryResult } from "@tanstack/react-query"; ··· 6 6 import type { InferSelectModel } from "drizzle-orm"; 7 7 import * as schema from "../../db/schema" 8 8 9 - const server = treaty<CumulusServer>('localhost:8080'); 10 9 11 10 export type Market = InferSelectModel<typeof schema.marketsTable> & { 12 11 bets?: InferSelectModel<typeof schema.betsTable>[], ··· 20 19 export const CumulusContext = createContext<CumulusContext | undefined>(undefined); 21 20 22 21 export default function Cumulus({ children }: PropsWithChildren) { 22 + 23 + const server = treaty<CumulusServer>(window.location.origin); 24 + 23 25 const { profile } = useAuth(); 24 26 25 27 const markets = useQuery({