3 changed files with 58 additions and 1 deletions
@ -0,0 +1,25 @@ |
|||||||
|
import { useRecoilValue } from 'recoil'; |
||||||
|
import WebsocketService from '../../services/websocket-service'; |
||||||
|
// import { setLocalStorage } from '../../utils/helpers';
|
||||||
|
import { websocketServiceAtom } from '../stores/ClientConfigStore'; |
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars */ |
||||||
|
interface Props {} |
||||||
|
|
||||||
|
export default function NameChangeModal(props: Props) { |
||||||
|
const websocketService = useRecoilValue<WebsocketService>(websocketServiceAtom); |
||||||
|
|
||||||
|
// const handleNameChange = () => {
|
||||||
|
// // Send name change
|
||||||
|
// const nameChange = {
|
||||||
|
// type: SOCKET_MESSAGE_TYPES.NAME_CHANGE,
|
||||||
|
// newName,
|
||||||
|
// };
|
||||||
|
// websocketService.send(nameChange);
|
||||||
|
|
||||||
|
// // Store it locally
|
||||||
|
// setLocalStorage(KEY_USERNAME, newName);
|
||||||
|
// };
|
||||||
|
|
||||||
|
return <div>Name change modal component goes here</div>; |
||||||
|
} |
||||||
@ -0,0 +1,15 @@ |
|||||||
|
import React from 'react'; |
||||||
|
import { ComponentStory, ComponentMeta } from '@storybook/react'; |
||||||
|
import NameChangeModal from '../components/modals/NameChangeModal'; |
||||||
|
|
||||||
|
export default { |
||||||
|
title: 'owncast/Modals/Name change', |
||||||
|
component: NameChangeModal, |
||||||
|
parameters: {}, |
||||||
|
} as ComponentMeta<typeof NameChangeModal>; |
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
const Template: ComponentStory<typeof NameChangeModal> = args => <NameChangeModal />; |
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
export const Basic = Template.bind({}); |
||||||
Loading…
Reference in new issue