Skip to content

Commit 1878cd0

Browse files
authored
Include LocalizationProvider on the player profile comments page to avoid a crash (#965)
1 parent c540d9a commit 1878cd0

File tree

1 file changed

+20
-16
lines changed
  • rcongui/src/pages/records/players/[playerId]

1 file changed

+20
-16
lines changed

rcongui/src/pages/records/players/[playerId]/index.jsx

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import {
1818
SummaryCard,
1919
DetailCard,
2020
} from "./styled";
21+
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
22+
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
2123
import PlayerProfileSummary from "@/components/player/profile/Summary";
2224
import PlayerProfileHeader from "@/components/player/profile/Header";
2325
import { generatePlayerActions } from "@/features/player-action/actions";
@@ -128,22 +130,24 @@ export default function PlayerProfilePage() {
128130
</CardContent>
129131
</SummaryCard>
130132

131-
<DetailCard elevation={0} variant="outlined">
132-
<CardContent>
133-
<Tabs
134-
value={getActiveTab()}
135-
onChange={handleTabChange}
136-
variant="standard"
137-
sx={{ mb: 3 }}
138-
>
139-
{DETAIL_LINKS.map((link) => (
140-
<Tab key={link.path} label={link.label} />
141-
))}
142-
</Tabs>
143-
{getActiveTab() === 0 && <ReceivedActions />}
144-
<Outlet context={{ profile, submit }} />
145-
</CardContent>
146-
</DetailCard>
133+
<LocalizationProvider dateAdapter={AdapterDayjs}>
134+
<DetailCard elevation={0} variant="outlined">
135+
<CardContent>
136+
<Tabs
137+
value={getActiveTab()}
138+
onChange={handleTabChange}
139+
variant="standard"
140+
sx={{ mb: 3 }}
141+
>
142+
{DETAIL_LINKS.map((link) => (
143+
<Tab key={link.path} label={link.label} />
144+
))}
145+
</Tabs>
146+
{getActiveTab() === 0 && <ReceivedActions />}
147+
<Outlet context={{ profile, submit }} />
148+
</CardContent>
149+
</DetailCard>
150+
</LocalizationProvider>
147151
</MainContent>
148152
</ProfileContainer>
149153
);

0 commit comments

Comments
 (0)