Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/components/nav/dashboard/Mobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import MobileMenuItem from 'app/components/nav/hub/MobileMenuItem';

export default function Mobile({ onClose }) {
const bdeConfig = useBDEConfig();
const clubsConfig = useClubsConfig();

const ItemsList = ({ config }) =>
useMemo(
Expand All @@ -26,7 +25,7 @@ export default function Mobile({ onClose }) {

return (
<>
{(bdeConfig.length > 0 || clubsConfig.length > 0) && (
{(bdeConfig.length > 0) && (
<MobileMenuItem
item={{
icon: <Dashboard />,
Expand All @@ -42,9 +41,8 @@ export default function Mobile({ onClose }) {

<ItemsList config={bdeConfig} />

{clubsConfig.length > 0 && <Divider className="m-2" />}
{<Divider className="m-2" />}

<ItemsList config={clubsConfig} />
</>
);
}
5 changes: 2 additions & 3 deletions app/components/nav/hub/Desktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import config from './config';

export default function Desktop() {
const bdeConfig = useBDEConfig();
const clubsConfig = useClubsConfig();

return useMemo(
() => (
Expand All @@ -19,7 +18,7 @@ export default function Desktop() {
<DesktopMenuItem key={item.to} item={item} />
))}

{(bdeConfig.length > 0 || clubsConfig.length > 0) && (
{(bdeConfig.length > 0) && (
<DesktopMenuItem
item={{
icon: <Dashboard />,
Expand All @@ -31,6 +30,6 @@ export default function Desktop() {
)}
</>
),
[bdeConfig.length, clubsConfig.length]
[bdeConfig.length]
);
}
2 changes: 1 addition & 1 deletion app/entities/clubs/queries/getClubs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { resolver } from '@blitzjs/rpc';
type GetClubsInput = Pick<Prisma.ClubFindManyArgs, 'where' | 'orderBy' | 'skip' | 'take'>;

export default resolver.pipe(
resolver.authorize(),
resolver.authorize(['*', 'bde']),
async ({ where, orderBy, skip = 0, take }: GetClubsInput, _ctx) => {
const clubs = await db.club.findMany({
where,
Expand Down