Skip to content

Commit

Permalink
releasef add limit param
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammers21 committed Feb 27, 2024
1 parent 2f394e4 commit d79bc38
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions frontend/src/containers/Profile/ObsWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ function getNoLogo(searchParams: URLSearchParams) {
return getSearchParamOrDefault(searchParams, "nologo", "false") === "true";
}

function getLimit(searchParams: URLSearchParams) {
return parseInt(getSearchParamOrDefault(searchParams, "limit", "10"));
}

export const ObsWidget = () => {
let { region, realm, name } = useParams();
const [searchParams, _] = useSearchParams();
Expand All @@ -41,6 +45,7 @@ export const ObsWidget = () => {
const layout = getLayout(searchParams);
const role = getRole(searchParams);
const nologo = getNoLogo(searchParams);
const limit = getLimit(searchParams);
useEffect(() => {
document.title = `OBS Widget - ${name}-${realm} on ${region?.toUpperCase()}`;
loadPlayerData();
Expand Down Expand Up @@ -88,8 +93,7 @@ export const ObsWidget = () => {
} else {
return true;
}
});
console.log("final", specAndMaxShuffle);
}).slice(0, limit);
let flex;
if (layout === "horizontal") {
flex = "flex-row";
Expand Down Expand Up @@ -141,7 +145,7 @@ export const ObsWidget = () => {

return (
<div>
<div className={`flex ${flex} gap-1 items-center justify-center`}>
<div className={` h-full flex ${flex} gap-1 content-center items-center justify-center`}>
{!nologo ? (
<div>
<Typography variant="h6">PVPQ.NET</Typography>
Expand Down

0 comments on commit d79bc38

Please sign in to comment.