-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(strapi/search-page): implement the search page (#5)
- Loading branch information
1 parent
db331df
commit 17b4f14
Showing
9 changed files
with
9,345 additions
and
1,330 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
import { VideoOnDemand } from './api.interface' | ||
import { | ||
VideoOnDemand, | ||
FetchVideoFilesResponse, | ||
Thumbnail, | ||
} from './api.interface' | ||
|
||
export interface IApi { | ||
fetchHighlightedVideos(): Promise<VideoOnDemand[]> | ||
fetchVodFiles(nextToken: string | null): Promise<FetchVideoFilesResponse> | ||
fetchThumbnail(id: string): Promise<Thumbnail> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,40 @@ | ||
export interface Thumbnail { | ||
src: string | ||
id: string | ||
ext: string | ||
src?: string | ||
createdAt?: string | ||
updatedAt?: string | ||
} | ||
|
||
export interface VideoOnDemand { | ||
export enum Source { | ||
SELF = 'SELF', | ||
YOUTUBE = 'YOUTUBE', | ||
LIVESTREAM_SELF = 'LIVESTREAM_SELF', | ||
} | ||
|
||
export interface Media { | ||
id: string | ||
title: string | ||
description: string | ||
highlighted: boolean | ||
// sections?: (MediasSections | null)[] | ||
source?: Source | keyof typeof Source | ||
thumbnail?: Thumbnail | ||
createdAt: string | ||
updatedAt: string | ||
src: string | ||
author: string | ||
viewCount?: number | ||
createdAt?: string | ||
updatedAt?: string | ||
} | ||
|
||
export interface VideoOnDemand { | ||
id: string | ||
media?: Media | ||
src?: string | ||
createdAt?: string | ||
updatedAt?: string | ||
} | ||
|
||
export interface FetchVideoFilesResponse { | ||
data: VideoOnDemand[] | ||
nextToken: string | null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.