Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

1.3 KB
Raw Blame
import { Meta, StoryFn } from '@storybook/nextjs';
import { FeatureRequests, FeatureRequestsProps } from './FeatureRequests';

export default {
  title: 'owncast/Admin/Featured Streams/FeatureRequests',
  component: FeatureRequests,
  parameters: {
    docs: {
      description: {
        component:
          'Lists incoming requests from other Owncast servers asking to feature this server’s stream, with approve/reject actions. Renders nothing when there are no pending requests.',
      },
    },
  },
} as Meta<typeof FeatureRequests>;

const noop = async () => {};

const Template: StoryFn<FeatureRequestsProps> = args => <FeatureRequests {...args} />;

export const WithRequests = Template.bind({});
WithRequests.args = {
  onApprove: noop,
  onReject: noop,
  requests: [
    {
      link: 'https://goodnight.example.com/federation/user/goodnight',
      name: 'Goodnight TV',
      username: '[email protected]',
      image: 'https://picsum.photos/seed/20/64/64',
    },
    {
      link: 'https://music.example.com/federation/user/music',
      name: 'Music Studio Live',
      username: '[email protected]',
    },
  ],
};

export const Loading = Template.bind({});
Loading.args = {
  onApprove: noop,
  onReject: noop,
  loading: true,
  requests: [],
};