- {card.description} -
- - ); -}; diff --git a/src/features/gameCard/index.ts b/src/features/gameCard/index.ts deleted file mode 100644 index fcda3e6..0000000 --- a/src/features/gameCard/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { GameCard } from "./gameCard"; - -export { GameCard }; diff --git a/src/features/itemCard/index.ts b/src/features/itemCard/index.ts new file mode 100644 index 0000000..de3f029 --- /dev/null +++ b/src/features/itemCard/index.ts @@ -0,0 +1,3 @@ +import { ItemCard } from "./itemCard"; + +export { ItemCard }; diff --git a/src/features/itemCard/itemCard.tsx b/src/features/itemCard/itemCard.tsx new file mode 100644 index 0000000..d5ceec5 --- /dev/null +++ b/src/features/itemCard/itemCard.tsx @@ -0,0 +1,52 @@ +import { + isAudiobook, + isGame, + isMovie, + ItemCardType, + ItemService, +} from "@/entities/item"; +import { Img } from "@/shared/ui"; +import Link from "next/link"; + +export const ItemCard = ({ card }: { card: ItemCardType }) => { + return ( + + {!!card.cover && ( ++ {card.description} +
+ + ); +}; diff --git a/src/shared/ui/modal.tsx b/src/shared/ui/modal.tsx index b8871a6..a2ab468 100644 --- a/src/shared/ui/modal.tsx +++ b/src/shared/ui/modal.tsx @@ -13,7 +13,7 @@ export const Modal = ({ children }: { children: React.ReactNode }) => { !closing && "animate-fadeIn", closing && "animate-fadeOut opacity-0", "flex items-center justify-around", - "absolute z-20 left-0 w-full h-full bg-[#000000c5]" + "absolute z-30 left-0 w-full h-full bg-[#000000c5]" )} onClick={() => { setClosing(true); diff --git a/src/widgets/gameInfo/gameInfo.tsx b/src/widgets/gameInfo/gameInfo.tsx deleted file mode 100644 index eba9752..0000000 --- a/src/widgets/gameInfo/gameInfo.tsx +++ /dev/null @@ -1,446 +0,0 @@ -"use client"; - -import { - gameCreateSchema, - GameCreateType, - GameService, - GameType, -} from "@/entities/game"; -import clsx from "clsx"; -import Link from "next/link"; -import { getYouTubeID } from "@/shared/utils"; -import { UserService } from "@/entities/user"; -import useSWR from "swr"; -import { useCallback, useEffect, useRef, useState, useMemo } from "react"; -import { useForm } from "react-hook-form"; -import { zodResolver } from "@hookform/resolvers/zod"; -import { Img } from "@/shared/ui"; -import { useDropzone } from "react-dropzone"; -import { FilesService } from "@/entities/files"; -import { SpinnerIcon } from "@/shared/assets/icons"; - -const isExistingGame = (game: GameCreateType | GameType): game is GameType => { - return (game as GameType).id !== undefined; -}; - -export const GameInfo = ({ - game: init_game, -}: { - game: GameCreateType | GameType; -}) => { - const [game, changeGame] = useStateИзменить обложку...
+ ) : ( + <> + + Для редактирования нажмите или перетащите новую обложку + поверх старой + + + Для редактирования нажмите на обложку и выберите фото + + > + )} + +