mockChannels.ts 529 B

1234567891011121314
  1. import { channelAvatarSources, channelPosterSources } from './mockImages'
  2. import { ChannelFields } from '@/api/queries/__generated__/ChannelFields'
  3. import rawChannels from './raw/channels.json'
  4. type MockChannel = ChannelFields
  5. const mockChannels: MockChannel[] = rawChannels.map((rawChannel, idx) => ({
  6. ...rawChannel,
  7. __typename: 'Channel',
  8. avatarPhotoURL: channelAvatarSources[idx % channelAvatarSources.length],
  9. coverPhotoURL: channelPosterSources[idx % channelPosterSources.length],
  10. }))
  11. export default mockChannels