From 6984794be10dd4fcdbea3eca332094e226506053 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com>
Date: Mon, 5 Aug 2024 12:52:40 -0500
Subject: [PATCH] feat: start of embeds
---
src/app/layout.tsx | 46 +++----
src/app/page.tsx | 12 +-
src/app/tools/embed/customize/tanks/page.tsx | 57 +++++++++
src/app/tools/embed/page.tsx | 5 +
src/app/tools/embed/types.ts | 31 +++++
src/app/tools/embed/utilities.ts | 9 ++
.../components/BodyLoader.tsx | 0
.../components/Controls.tsx | 0
.../components/Header.tsx | 0
.../components/Info.tsx | 0
.../components/PlayerCountControl.tsx | 0
.../components/RowLoader.tsx | 0
.../components/Table.tsx | 0
.../components/TankRow.tsx | 0
.../components/Tanks.tsx | 0
.../components/TierBreakdown.tsx | 0
.../components/Total.tsx | 0
.../layout.tsx | 0
.../page.tsx | 0
src/components/EmbedConfigInputs.tsx | 115 ++++++++++++++++++
src/components/Party3.tsx | 4 +-
src/components/TanksEmbed.tsx | 46 +++++++
src/constants/tools.tsx | 18 ++-
23 files changed, 313 insertions(+), 30 deletions(-)
create mode 100644 src/app/tools/embed/customize/tanks/page.tsx
create mode 100644 src/app/tools/embed/page.tsx
create mode 100644 src/app/tools/embed/types.ts
create mode 100644 src/app/tools/embed/utilities.ts
rename src/app/tools/{tank-performance => performance}/components/BodyLoader.tsx (100%)
rename src/app/tools/{tank-performance => performance}/components/Controls.tsx (100%)
rename src/app/tools/{tank-performance => performance}/components/Header.tsx (100%)
rename src/app/tools/{tank-performance => performance}/components/Info.tsx (100%)
rename src/app/tools/{tank-performance => performance}/components/PlayerCountControl.tsx (100%)
rename src/app/tools/{tank-performance => performance}/components/RowLoader.tsx (100%)
rename src/app/tools/{tank-performance => performance}/components/Table.tsx (100%)
rename src/app/tools/{tank-performance => performance}/components/TankRow.tsx (100%)
rename src/app/tools/{tank-performance => performance}/components/Tanks.tsx (100%)
rename src/app/tools/{tank-performance => performance}/components/TierBreakdown.tsx (100%)
rename src/app/tools/{tank-performance => performance}/components/Total.tsx (100%)
rename src/app/tools/{tank-performance => performance}/layout.tsx (100%)
rename src/app/tools/{tank-performance => performance}/page.tsx (100%)
create mode 100644 src/components/EmbedConfigInputs.tsx
create mode 100644 src/components/TanksEmbed.tsx
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index bb5b82e8a..aa8f3e6b0 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -28,7 +28,7 @@ const robotoFlex = Roboto_Flex({
export default function RootLayout({ children }: RootLayoutProps) {
const pathname = usePathname();
- const isEmbed = pathname.split('/')[1] === 'embeds';
+ const isEmbed = pathname.startsWith('/tools/embed/host');
const isRoot = pathname === '/';
return (
@@ -56,30 +56,34 @@ export default function RootLayout({ children }: RootLayoutProps) {
backgroundColor: isEmbed ? 'transparent' : undefined,
}}
>
-
-
- {!isEmbed && }
+
+ {!isEmbed && }
-
+
- }>{children}
+ }>{children}
- {!isEmbed && }
-
-
+ {!isEmbed && }
+
+
+ )}
+
+ {isEmbed && children}