-
Notifications
You must be signed in to change notification settings - Fork 135
/
Copy pathindex.ts
129 lines (113 loc) · 2.82 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/* eslint-disable no-unused-vars */
import { Dispatch, SetStateAction } from "react";
import { Id } from "@/convex/_generated/dataModel";
export interface EmptyStateProps {
title: string;
search?: boolean;
buttonText?: string;
buttonLink?: string;
}
export interface TopPodcastersProps {
_id: Id<"users">;
_creationTime: number;
email: string;
imageUrl: string;
clerkId: string;
name: string;
podcast: {
podcastTitle: string;
podcastId: Id<"podcasts">;
}[];
totalPodcasts: number;
}
export interface PodcastProps {
_id: Id<"podcasts">;
_creationTime: number;
audioStorageId: Id<"_storage"> | null;
user: Id<"users">;
podcastTitle: string;
podcastDescription: string;
audioUrl: string | null;
imageUrl: string | null;
imageStorageId: Id<"_storage"> | null;
author: string;
authorId: string;
authorImageUrl: string;
voicePrompt: string;
imagePrompt: string | null;
voiceType: string;
audioDuration: number;
views: number;
}
export interface ProfilePodcastProps {
podcasts: PodcastProps[];
listeners: number;
}
export interface GeneratePodcastProps {
voiceType: string;
setAudio: Dispatch<SetStateAction<string>>;
audio: string;
setAudioStorageId: Dispatch<SetStateAction<Id<"_storage"> | null>>;
voicePrompt: string;
setVoicePrompt: Dispatch<SetStateAction<string>>;
setAudioDuration: Dispatch<SetStateAction<number>>;
}
export interface GenerateThumbnailProps {
setImage: Dispatch<SetStateAction<string>>;
setImageStorageId: Dispatch<SetStateAction<Id<"_storage"> | null>>;
image: string;
imagePrompt: string;
setImagePrompt: Dispatch<SetStateAction<string>>;
}
export interface LatestPodcastCardProps {
imgUrl: string;
title: string;
duration: string;
index: number;
audioUrl: string;
author: string;
views: number;
podcastId: Id<"podcasts">;
}
export interface PodcastDetailPlayerProps {
audioUrl: string;
podcastTitle: string;
author: string;
isOwner: boolean;
imageUrl: string;
podcastId: Id<"podcasts">;
imageStorageId: Id<"_storage">;
audioStorageId: Id<"_storage">;
authorImageUrl: string;
authorId: string;
}
export interface AudioProps {
title: string;
audioUrl: string;
author: string;
imageUrl: string;
podcastId: string;
}
export interface AudioContextType {
audio: AudioProps | undefined;
setAudio: React.Dispatch<React.SetStateAction<AudioProps | undefined>>;
}
export interface PodcastCardProps {
imgUrl: string;
title: string;
description: string;
podcastId: Id<"podcasts">;
}
export interface CarouselProps {
fansLikeDetail: TopPodcastersProps[];
}
export interface ProfileCardProps {
podcastData: ProfilePodcastProps;
imageUrl: string;
userFirstName: string;
}
export type UseDotButtonType = {
selectedIndex: number;
scrollSnaps: number[];
onDotButtonClick: (index: number) => void;
};