1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-22 22:54:22 +00:00

Clean up more imports

This commit is contained in:
Steffo 2022-06-08 04:55:16 +02:00
parent 02df4ae841
commit 3fe617872d
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 4 additions and 7 deletions

View file

@ -1,6 +1,4 @@
import { database } from "./prismaClient"
import { AccountTelegram, Token, User } from "@prisma/client"
import nodecrypto from "crypto"
import { default as nodecrypto } from "crypto"
import { TelegramLoginData } from "../types/user"

View file

@ -1,12 +1,11 @@
import * as React from "react"
import { useContext } from "react"
import { Context, Dispatch, SetStateAction } from "react"
import { createDefinedContext } from "./definedContext"
/**
* Create a new defined context (see {@link createDefinedContext}) containing the tuple returned by {@link React.useState} for the given type.
* Create a new defined context (see {@link createDefinedContext}) containing the tuple returned by useState for the given type.
*
* @returns The created context.
*/
export function createStateContext<T>(): React.Context<[T, React.Dispatch<React.SetStateAction<T>>] | undefined> {
export function createStateContext<T>(): Context<[T, Dispatch<SetStateAction<T>>] | undefined> {
return createDefinedContext<[T, React.Dispatch<React.SetStateAction<T>>]>()
}