diff --git a/src/app/routes/_authed/admin/preview.tsx b/src/app/routes/_authed/admin/preview.tsx
index 2172f83..629824a 100644
--- a/src/app/routes/_authed/admin/preview.tsx
+++ b/src/app/routes/_authed/admin/preview.tsx
@@ -1,6 +1,7 @@
-import BracketView from "@/features/bracket/components/bracket-view";
-import { useBracketPreview } from "@/features/bracket/queries";
+import BracketPreview from "@/features/bracket/components/preview";
+import { NumberInput } from "@mantine/core";
import { createFileRoute } from "@tanstack/react-router";
+import { useState } from "react";
export const Route = createFileRoute("/_authed/admin/preview")({
component: RouteComponent,
@@ -10,10 +11,25 @@ export const Route = createFileRoute("/_authed/admin/preview")({
title: "Bracket Preview",
},
withPadding: false,
+ fullWidth: true,
}),
});
function RouteComponent() {
- const bracket = useBracketPreview(16);
- return ;
+ const [n, setN] = useState(16);
+ return (
+ <>
+ setN(value as number)}
+ w={150}
+ mb={2}
+ mx="md"
+ />
+
+ >
+ );
}
diff --git a/src/features/bracket/components/bracket-view.tsx b/src/features/bracket/components/bracket-view.tsx
index fbaeffb..88b6bf7 100644
--- a/src/features/bracket/components/bracket-view.tsx
+++ b/src/features/bracket/components/bracket-view.tsx
@@ -20,7 +20,7 @@ const BracketView: React.FC = ({ bracket, onAnnounce }) => {
}, [bracket.winners, bracket.losers]);
return = ({ n }) => {
+ const { data: bracket } = useBracketPreview(n);
+
+ return
+};
+
+export default BracketPreview;
\ No newline at end of file
diff --git a/src/hooks/use-appshell-height.ts b/src/hooks/use-appshell-height.ts
index c14f631..6079a81 100644
--- a/src/hooks/use-appshell-height.ts
+++ b/src/hooks/use-appshell-height.ts
@@ -9,10 +9,10 @@ const useAppShellHeight = () => {
const height = useMemo(() => {
const appShellBottomPadding = isMobile ? "70px" : "0px";
const pageBottomPadding = "20px";
- const mobileNavbar = isMobile && !header.collapsed ? "4rem" : "0px";
+ // const mobileNavbar = isMobile && !header.collapsed ? "4rem" : "0px";
const pullablePadding = "1.285rem";
- return `calc(100dvh - var(--app-shell-header-height, 0px) - ${mobileNavbar} - ${pullablePadding} - ${appShellBottomPadding} - ${pageBottomPadding})`;
+ return `calc(100dvh - var(--app-shell-header-height, 0px) - ${pullablePadding} - ${appShellBottomPadding} - ${pageBottomPadding})`;
}, [isMobile, header.collapsed]);
return height;