mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
fix(editor): make permalink types more sane
This commit is contained in:
parent
0d96a4f973
commit
20efb22605
2 changed files with 3 additions and 4 deletions
|
@ -2,12 +2,11 @@ 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 { Guild } from '@roleypoly/types';
|
||||
import { GoInfo } from 'react-icons/go';
|
||||
|
||||
export const EditorInviteLink = (props: { guild: Guild }) => {
|
||||
export const EditorInviteLink = (props: { guildId: string }) => {
|
||||
const currentURL = new URL(location.href);
|
||||
currentURL.pathname = `/s/${props.guild.id}`;
|
||||
currentURL.pathname = `/s/${props.guildId}`;
|
||||
currentURL.search = '';
|
||||
|
||||
const inviteLink = currentURL.toString();
|
||||
|
|
|
@ -61,7 +61,7 @@ export const EditorShell = (props: EditorShellProps) => {
|
|||
<Space />
|
||||
<ServerMasthead guild={props.guild.guild} editable={false} />
|
||||
<Space />
|
||||
<EditorInviteLink guild={props.guild.guild} />
|
||||
<EditorInviteLink guildId={props.guild.id} />
|
||||
<Space />
|
||||
<EditableServerMessage
|
||||
onChange={onMessageChange}
|
||||
|
|
Loading…
Add table
Reference in a new issue