Skip to content

Commit

Permalink
fix(error): 🐛 Undefined error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nudelsuppe42 committed Dec 23, 2023
1 parent 888f734 commit c5be0f4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
4 changes: 2 additions & 2 deletions src/pages/_error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ function ErrorPage(props: any) {
</Title>
)}
<Title style={{ color: '#ffffff' }} ta="center" order={1}>
{errors[code].title}
{errors[code]?.title || errors[500].title}
</Title>
<Title style={{ color: theme.colors.gray[4] }} ta="center" order={3}>
{errors[code].message}
{errors[code]?.message || errors[500].message}
<br />
{code != 1 && (
<Button
Expand Down
54 changes: 28 additions & 26 deletions src/pages/teams/[team]/manage/members.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,31 +253,6 @@ const Settings = () => {
>
<SettingsTabs team={router.query.team?.toString() || ''} loading={!(builders && managers)}>
<SearchInput onSearch={setFilter} inputProps={{ placeholder: 'Filter...' }} />
<Title order={3} mt="md">
Builders
</Title>
<UsersTable
loading={!builders}
data={
builders
? builders.filter((b: any) =>
b.username? b.username?.toLowerCase().includes(filter.toLowerCase()):true,
)
: []
}
actions={(data) => (
<Group gap={0} justify="flex-end">
<ActionIcon
variant="subtle"
color="red"
onClick={() => handleRemoveBuilder(data)}
loading={loadingManagers}
>
<IconTrash style={{ width: rem(18), height: rem(18) }} stroke={1.5} />
</ActionIcon>
</Group>
)}
/>
<Group justify={'space-between'}>
<Stack gap={0}>
<Title order={3} mt="md">
Expand All @@ -295,7 +270,9 @@ const Settings = () => {
loading={!managers}
data={
managers
? managers.filter((b: any) => b.username.toLowerCase().includes(filter.toLowerCase()))
? managers.filter((b: any) =>
b.username?.toLowerCase().includes(filter.toLowerCase()),
)
: []
}
actions={(data) => (
Expand Down Expand Up @@ -332,6 +309,31 @@ const Settings = () => {
</Table.Td>
)}
/>
<Title order={3} mt="md">
Builders
</Title>
<UsersTable
loading={!builders}
data={
builders
? builders.filter((b: any) =>
b.username ? b.username?.toLowerCase().includes(filter.toLowerCase()) : true,
)
: []
}
actions={(data) => (
<Group gap={0} justify="flex-end">
<ActionIcon
variant="subtle"
color="red"
onClick={() => handleRemoveBuilder(data)}
loading={loadingManagers}
>
<IconTrash style={{ width: rem(18), height: rem(18) }} stroke={1.5} />
</ActionIcon>
</Group>
)}
/>
</SettingsTabs>
</Page>
);
Expand Down

0 comments on commit c5be0f4

Please sign in to comment.