mirror of
https://github.com/Steffo99/festa.git
synced 2025-01-03 12:34:20 +00:00
Cleanup unused things
This commit is contained in:
parent
41d38234fb
commit
c84ef05393
6 changed files with 1 additions and 54 deletions
|
@ -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";
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import Image, { ImageProps } from "next/image";
|
||||
import { HTMLProps } from "react";
|
||||
import classNames from "classnames"
|
||||
|
||||
export function Avatar(props: ImageProps) {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import Image from "next/image";
|
||||
import { PostcardContext } from "../contexts/postcard";
|
||||
import { useDefinedContext } from "../utils/definedContext";
|
||||
|
||||
|
|
|
@ -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<any>(null)
|
||||
|
||||
return <section>
|
||||
</section>
|
||||
}
|
|
@ -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 (
|
||||
<a href={`https://t.me/${u.username}`}>
|
||||
<TelegramAvatar u={u}/>
|
||||
{u.username}
|
||||
</a>
|
||||
)
|
||||
else if(u.last_name) return (
|
||||
<span>
|
||||
<TelegramAvatar u={u}/>
|
||||
{u.first_name} {u.last_name}
|
||||
</span>
|
||||
)
|
||||
else return (
|
||||
<span>
|
||||
<TelegramAvatar u={u}/>
|
||||
{u.first_name}
|
||||
</span>
|
||||
)
|
||||
}
|
Loading…
Reference in a new issue