mirror of
https://github.com/factorgroup/nightmarket.git
synced 2026-01-14 07:57:55 -05:00
23 lines
552 B
TypeScript
23 lines
552 B
TypeScript
import { h } from "preact";
|
|
import { createContext } from "preact";
|
|
import { useState } from "preact/hooks";
|
|
|
|
// A session history of users on chain transactions
|
|
// Can be of type `list` `ask` or `sale`
|
|
export const MyTransactionContext = createContext([] as any);
|
|
|
|
export const MyTransactionProvider = (props) => {
|
|
const [transactions, setTransactions] = useState([] as transaction);
|
|
|
|
return (
|
|
<MyTransactionContext.Provider
|
|
value={{ transactions, setTransactions }}
|
|
children={props.children}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export interface transaction {
|
|
|
|
};
|