Switch to absolute imports
This commit is contained in:
+28
-28
@@ -1,4 +1,4 @@
|
||||
import { account } from "./hooks"
|
||||
import { account } from "@/lib/state"
|
||||
|
||||
const API_URL = import.meta.env.VITE_API_URL
|
||||
|
||||
@@ -51,33 +51,6 @@ export type Relay = {
|
||||
push_enabled: number
|
||||
}
|
||||
|
||||
export type Tenant = {
|
||||
pubkey: string
|
||||
nwc_url: string
|
||||
created_at: number
|
||||
billing_anchor: number
|
||||
}
|
||||
|
||||
export type Invoice = {
|
||||
id: string
|
||||
tenant: string
|
||||
status: string
|
||||
created_at: number
|
||||
attempted_at: number
|
||||
error: string
|
||||
closed_at: number
|
||||
sent_at: number
|
||||
paid_at: number
|
||||
bolt11: string
|
||||
period_start: number
|
||||
period_end: number
|
||||
}
|
||||
|
||||
export type Identity = {
|
||||
pubkey: string
|
||||
is_admin: boolean
|
||||
}
|
||||
|
||||
export type CreateRelayInput = {
|
||||
tenant?: string
|
||||
subdomain: string
|
||||
@@ -109,6 +82,33 @@ export type UpdateRelayInput = {
|
||||
push_enabled?: number
|
||||
}
|
||||
|
||||
export type Tenant = {
|
||||
pubkey: string
|
||||
nwc_url: string
|
||||
created_at: number
|
||||
billing_anchor: number
|
||||
}
|
||||
|
||||
export type Invoice = {
|
||||
id: string
|
||||
tenant: string
|
||||
status: string
|
||||
created_at: number
|
||||
attempted_at: number
|
||||
error: string
|
||||
closed_at: number
|
||||
sent_at: number
|
||||
paid_at: number
|
||||
bolt11: string
|
||||
period_start: number
|
||||
period_end: number
|
||||
}
|
||||
|
||||
export type Identity = {
|
||||
pubkey: string
|
||||
is_admin: boolean
|
||||
}
|
||||
|
||||
export async function makeAuth(): Promise<string | undefined> {
|
||||
const current = account()
|
||||
if (!current) return undefined
|
||||
|
||||
@@ -19,23 +19,8 @@ import {
|
||||
type Relay,
|
||||
type Tenant,
|
||||
type UpdateRelayInput,
|
||||
} from "./api"
|
||||
import { account, eventStore, pool } from "./state"
|
||||
|
||||
export {
|
||||
PLATFORM_NAME,
|
||||
accountManager,
|
||||
account,
|
||||
setAccount,
|
||||
identity,
|
||||
refetchIdentity,
|
||||
setIdentity,
|
||||
eventStore,
|
||||
pool,
|
||||
type EventSigner,
|
||||
type SignedEvent,
|
||||
type UnsignedEvent,
|
||||
} from "./state"
|
||||
} from "@/lib/api"
|
||||
import { account, eventStore, pool } from "@/lib/state"
|
||||
|
||||
export function useProfilePicture(pubkey: () => string | undefined) {
|
||||
const [picture, setPicture] = createSignal<string | undefined>()
|
||||
|
||||
@@ -6,7 +6,7 @@ import { EventStore } from "applesauce-core"
|
||||
import { createEventLoaderForStore } from "applesauce-loaders/loaders"
|
||||
import { RelayPool } from "applesauce-relay"
|
||||
import { NostrConnectSigner } from "applesauce-signers"
|
||||
import { getIdentity } from "./api"
|
||||
import { getIdentity } from "@/lib/api"
|
||||
|
||||
export type UnsignedEvent = {
|
||||
kind: number
|
||||
|
||||
Reference in New Issue
Block a user