mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 03:49:11 +00:00
fix code quality issues
This commit is contained in:
parent
4dc0eeaee3
commit
9310dc31f9
4 changed files with 8 additions and 25 deletions
|
@ -1,11 +1,10 @@
|
|||
import * as React from 'react';
|
||||
import { EditorCategory } from './EditorCategory';
|
||||
import {
|
||||
mockCategory,
|
||||
roleCategory2,
|
||||
roleCategory,
|
||||
guildRoles,
|
||||
} from 'roleypoly/src/design-system/shared-types/storyData';
|
||||
roleCategory2,
|
||||
} from 'roleypoly/common/types/storyData';
|
||||
import { EditorCategory } from './EditorCategory';
|
||||
|
||||
export default {
|
||||
title: 'Molecules/Editor/Category',
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
import Link from 'next/link';
|
||||
import * as React from 'react';
|
||||
import { GoOrganization } from 'react-icons/go';
|
||||
import { Guilds } from 'roleypoly/backend-worker/utils/kv';
|
||||
import {
|
||||
DiscordUser,
|
||||
GuildEnumeration,
|
||||
GuildSlug,
|
||||
RoleypolyUser,
|
||||
} from 'roleypoly/common/types';
|
||||
import { guildEnum } from 'roleypoly/common/types/storyData';
|
||||
import { DiscordUser, GuildSlug } from 'roleypoly/common/types';
|
||||
import { DynamicLogomark } from 'roleypoly/design-system/atoms/branding';
|
||||
import { Popover } from 'roleypoly/design-system/atoms/popover';
|
||||
import { GuildNav } from 'roleypoly/design-system/molecules/guild-nav';
|
||||
|
@ -71,7 +64,7 @@ export const Authed = (props: Props) => {
|
|||
active={serverPopoverState}
|
||||
onExit={() => setServerPopoverState(false)}
|
||||
>
|
||||
<GuildNav guilds={props.guilds} />
|
||||
{() => <GuildNav guilds={props.guilds} />}
|
||||
</Popover>
|
||||
</MastheadLeft>
|
||||
<MastheadRight>
|
||||
|
@ -91,7 +84,7 @@ export const Authed = (props: Props) => {
|
|||
active={userPopoverState}
|
||||
onExit={() => setUserPopoverState(false)}
|
||||
>
|
||||
{props.user && <UserPopover user={props.user} />}
|
||||
{() => props.user && <UserPopover user={props.user} />}
|
||||
</Popover>
|
||||
</MastheadRight>
|
||||
</MastheadAlignment>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import * as React from 'react';
|
||||
import { GuildEnumeration, RoleypolyUser } from 'roleypoly/common/types';
|
||||
import { AppShell, AppShellProps } from 'roleypoly/design-system/organisms/app-shell';
|
||||
import {
|
||||
RolePicker,
|
||||
|
@ -9,15 +8,9 @@ import {
|
|||
export type RolePickerTemplateProps = RolePickerProps & AppShellProps;
|
||||
|
||||
export const RolePickerTemplate = (props: RolePickerTemplateProps) => {
|
||||
const { user, ...pickerProps } = props;
|
||||
const { user, guilds, activeGuildId, ...pickerProps } = props;
|
||||
return (
|
||||
<AppShell
|
||||
guildEnumeration={props.guildEnumeration}
|
||||
activeGuildId={props.activeGuildId}
|
||||
user={user.discorduser}
|
||||
guilds={user.guilds}
|
||||
small
|
||||
>
|
||||
<AppShell activeGuildId={activeGuildId} user={user} guilds={guilds} small>
|
||||
<RolePicker {...pickerProps} />
|
||||
</AppShell>
|
||||
);
|
||||
|
|
|
@ -38,5 +38,3 @@ export const isAuthenticated = () => {
|
|||
const authCtx = useAuth();
|
||||
return authCtx.sessionKey !== null;
|
||||
};
|
||||
|
||||
export const;
|
||||
|
|
Loading…
Add table
Reference in a new issue