mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 20:09:11 +00:00
25 lines
1 KiB
TypeScript
25 lines
1 KiB
TypeScript
import { palette } from '@roleypoly/design-system/atoms/colors';
|
|
import { CopyArea } from '@roleypoly/design-system/atoms/copy-area';
|
|
import { AmbientLarge } from '@roleypoly/design-system/atoms/typography';
|
|
import { MessageBox } from '@roleypoly/design-system/organisms/role-picker/RolePicker.styled';
|
|
import { GoInfo } from 'react-icons/go';
|
|
|
|
export const EditorInviteLink = (props: { guildId: string }) => {
|
|
const currentURL = new URL(location.href);
|
|
currentURL.pathname = `/s/${props.guildId}`;
|
|
currentURL.search = '';
|
|
|
|
const inviteLink = currentURL.toString();
|
|
|
|
return (
|
|
<MessageBox>
|
|
Share this link with your server members, or ping{' '}
|
|
<span style={{ color: palette.taupe500 }}>@roleypoly</span> in your server.
|
|
<CopyArea value={inviteLink} />
|
|
<AmbientLarge style={{ display: 'flex', color: palette.taupe600 }}>
|
|
<GoInfo style={{ position: 'relative', top: 4 }} />
|
|
This link will never change. Share it with anyone!
|
|
</AmbientLarge>
|
|
</MessageBox>
|
|
);
|
|
};
|