/
sergs13
/
six-cities
Обзор
Документация
Войти
/
sergs13
/
six-cities
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/types/types.ts
82 строки
1 KB
sergs1305
Разделит reducer на части + сопутствующий рефакторинг
15 апр 2025, 15:40
15 апр 2025, 15:40
df911e1
Код
Авторство
О чём код?
export type Location = { latitude: number; longitude: number; zoom: number; } export type City = { name: string; location: Location; } export type Offer = { id: string; title: string; type: string; price: number; previewImage: string; city: City; location: Location; isFavorite: boolean; isPremium: boolean; rating: number; } export type FullOffer = { id: string; title: string; type: string; price: number; city: City; location: Location; isFavorite: boolean; isPremium: boolean; rating: number; description: string; bedrooms: number; goods: [string]; host: User; images: [string]; maxAdults: number; } export type Offers = Offer[]; export type User = { name: string; avatarUrl: string; isPro: boolean; } export type Comment = { id: string; date: string; user: User; comment: string; rating: number; } export type Comments = Comment[]; export type Point = { id: string; latitude: number; longitude: number; zoom: number; } export type CommentWithId = Comment & { commentId: string; }; export type CommentsToDisplay = CommentWithId[]; export type CommentToPost = { comment: string; rating: number; } export type AppData = { offers: Offers; isOffersDataLoading: boolean; };