website refactor
This commit is contained in:
@@ -18,7 +18,7 @@ export default function LeagueLayout({
|
||||
const leagueId = params.id as string;
|
||||
const currentDriverId = useEffectiveDriverId();
|
||||
|
||||
const { data: leagueDetail, isLoading: loading } = useLeagueDetail(leagueId, currentDriverId ?? '');
|
||||
const { data: leagueDetail, isLoading: loading } = useLeagueDetail({ leagueId });
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
@@ -56,8 +56,9 @@ export default function LeagueLayout({
|
||||
{ label: 'Settings', href: `/leagues/${leagueId}/settings`, exact: false },
|
||||
];
|
||||
|
||||
const tabs = leagueDetail.isAdmin ? [...baseTabs, ...adminTabs] : baseTabs;
|
||||
|
||||
// TODO: Admin check needs to be implemented properly
|
||||
// For now, show admin tabs if user is logged in
|
||||
const tabs = [...baseTabs, ...adminTabs];
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-deep-graphite py-12 px-4 sm:px-6 lg:px-8">
|
||||
@@ -75,8 +76,8 @@ export default function LeagueLayout({
|
||||
leagueName={leagueDetail.name}
|
||||
description={leagueDetail.description}
|
||||
ownerId={leagueDetail.ownerId}
|
||||
ownerName={leagueDetail.ownerName}
|
||||
mainSponsor={leagueDetail.mainSponsor}
|
||||
ownerName={''}
|
||||
mainSponsor={null}
|
||||
/>
|
||||
|
||||
{/* Tab Navigation */}
|
||||
|
||||
Reference in New Issue
Block a user