mirror of
https://github.com/owncast/owncast.git
synced 2024-11-27 08:00:16 +03:00
b38df2fbe3
* Inject services with useContext * Extract service for video settings * Create mock factories for services * Create test data for chat history * Add story to visualize different layouts * Fix renaming mistake * Add landscape and portrait viewports * Add landscape stories --------- Co-authored-by: Gabe Kangas <gabek@real-ity.com>
18 lines
573 B
TypeScript
18 lines
573 B
TypeScript
import { ChatMessage } from '../interfaces/chat-message.model';
|
|
import { ChatStaticService, UserRegistrationResponse } from './chat-service';
|
|
|
|
export const chatServiceMockOf = (
|
|
chatHistory: ChatMessage[],
|
|
userRegistrationResponse: UserRegistrationResponse,
|
|
): ChatStaticService =>
|
|
class ChatServiceMock {
|
|
public static async getChatHistory(): Promise<ChatMessage[]> {
|
|
return chatHistory;
|
|
}
|
|
|
|
public static async registerUser(): Promise<UserRegistrationResponse> {
|
|
return userRegistrationResponse;
|
|
}
|
|
};
|
|
|
|
export default chatServiceMockOf;
|