diff --git a/components/ActionEventList.tsx b/components/ActionEventList.tsx index 237a68b..6d79dfe 100644 --- a/components/ActionEventList.tsx +++ b/components/ActionEventList.tsx @@ -3,7 +3,6 @@ import { useTranslation } from "next-i18next"; import { HTMLProps } from "react"; import { useMyEvents } from "../hooks/useMyEvents"; import { Loading } from "./Loading"; -import { Event } from "@prisma/client"; import { EventList } from "./EventList"; import { EventCreate } from "./EventCreate"; diff --git a/components/Avatar.tsx b/components/Avatar.tsx index 717b05e..8afe777 100644 --- a/components/Avatar.tsx +++ b/components/Avatar.tsx @@ -1,5 +1,4 @@ import Image, { ImageProps } from "next/image"; -import { HTMLProps } from "react"; import classNames from "classnames" export function Avatar(props: ImageProps) { diff --git a/components/EventCreate.tsx b/components/EventCreate.tsx index 9082161..4687542 100644 --- a/components/EventCreate.tsx +++ b/components/EventCreate.tsx @@ -1,15 +1,10 @@ import { Event } from "@prisma/client" -import { AxiosError } from "axios" import { useTranslation } from "next-i18next" import { useRouter } from "next/router" -import { FormEvent, MouseEventHandler, useCallback, useRef, useState } from "react" -import { useAxios } from "../hooks/useAxios" +import { useState } from "react" import { useAxiosRequest } from "../hooks/useAxiosRequest" -import { ApiError } from "../types/api" -import { FestaLoginData } from "../types/user" import { Loading } from "./Loading" import { useEffect } from "react" -import { ErrorInline } from "./ErrorInline" import { ErrorBlock } from "./ErrorBlock" export function EventCreate() { diff --git a/components/Postcard.tsx b/components/Postcard.tsx index 66dd7ab..0bcf41c 100644 --- a/components/Postcard.tsx +++ b/components/Postcard.tsx @@ -1,4 +1,3 @@ -import Image from "next/image"; import { PostcardContext } from "../contexts/postcard"; import { useDefinedContext } from "../utils/definedContext"; diff --git a/components/SectionLoginTelegram.tsx b/components/SectionLoginTelegram.tsx deleted file mode 100644 index 5dc9a93..0000000 --- a/components/SectionLoginTelegram.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { useTranslation } from "next-i18next" -import { useCallback, useState } from "react" -import { LoginContext } from "../contexts/login" -import { useDefinedContext } from "../utils/definedContext" -import { TelegramLoginButton } from "./TelegramLoginButton" -import { default as axios } from "axios" -import { AuthenticatedUserData, TelegramLoginData } from "../types/user" - - -export function SectionLoginTelegram() { - const { t } = useTranslation("common") - const [login, setLogin] = useDefinedContext(LoginContext) - const [error, setError] = useState(null) - - return
-
-} \ No newline at end of file diff --git a/components/TelegramUserInline.tsx b/components/TelegramUserInline.tsx deleted file mode 100644 index 571a648..0000000 --- a/components/TelegramUserInline.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { TelegramLoginData } from "../types/user"; -import { TelegramAvatar } from "./TelegramAvatar"; - -interface Props { - u: TelegramLoginData -} - -export function TelegramUserInline({u}: Props) { - - if(u.username) return ( - - - {u.username} - - ) - else if(u.last_name) return ( - - - {u.first_name} {u.last_name} - - ) - else return ( - - - {u.first_name} - - ) -} \ No newline at end of file