From 77d06bda4238f07bc39e2b52af9dca7262018066 Mon Sep 17 00:00:00 2001 From: Pol Thomas Date: Mon, 15 Dec 2025 17:23:19 +0100 Subject: [PATCH 1/3] Test --- apps/web/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index ce643bd..bc39f5a 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -29,7 +29,7 @@ const queryClient = new QueryClient({ }, }); -// TODO: Allow users to update videos +// TODO: Allow users to update videos !! // Disable SplashScreen and PWA Install Prompt in development const isProduction = import.meta.env.PROD; From 88beb0dae44312bd1afac8ed2f059046756ae83d Mon Sep 17 00:00:00 2001 From: Pol Thomas Date: Mon, 15 Dec 2025 17:26:57 +0100 Subject: [PATCH 2/3] FIx format --- docs/docs/architecture.md | 9 ++++++--- docs/docs/deployment.md | 11 ++++++++--- docs/docs/getting-started.md | 6 +++--- docs/docs/routing.md | 18 ++++++++++-------- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/docs/docs/architecture.md b/docs/docs/architecture.md index a8a4973..57dcdfe 100644 --- a/docs/docs/architecture.md +++ b/docs/docs/architecture.md @@ -1,7 +1,7 @@ --- -title: "Architecture Overview" -description: "A comprehensive overview of the Bailapp architecture, including folder structure, key components, hooks, services, and contexts." -icon: "πŸ—οΈ" +title: 'Architecture Overview' +description: 'A comprehensive overview of the Bailapp architecture, including folder structure, key components, hooks, services, and contexts.' +icon: 'πŸ—οΈ' order: 1 --- @@ -43,11 +43,13 @@ The components directory holds the UI components that are used throughout the ap ### React Contexts and Hooks - **`useAuth`**: Provides authentication state. + ```typescript useAuth(): { user: User | null } ``` - **`useChoreographies`**: Manages choreographies with CRUD operations. + ```typescript useChoreographies(): { choreographies: Choreography[]; @@ -65,6 +67,7 @@ The components directory holds the UI components that are used throughout the ap ``` - **`useFigures`**: Manages figures and shorts. + ```typescript useFigures(): { figures: Figure[]; diff --git a/docs/docs/deployment.md b/docs/docs/deployment.md index 84d87f1..2a032d3 100644 --- a/docs/docs/deployment.md +++ b/docs/docs/deployment.md @@ -1,7 +1,7 @@ --- -title: "Deployment Instructions for BailApp" -description: "Step-by-step guide for building and deploying BailApp to Firebase Hosting, including emulator usage and best practices." -icon: "πŸš€" +title: 'Deployment Instructions for BailApp' +description: 'Step-by-step guide for building and deploying BailApp to Firebase Hosting, including emulator usage and best practices.' +icon: 'πŸš€' order: 2 --- @@ -108,11 +108,13 @@ This command compiles the application and outputs the files to the `apps/web/dis 1. **Environment Variables**: Make sure to configure any necessary environment variables before deployment. You can use a `.env` file for local development and set them in the Firebase console for production. 2. **Testing**: Always test your application locally using the Firebase emulators before deploying to production. You can start the emulators with: + ```bash npm run emu ``` 3. **Linting and Formatting**: Ensure your code is linted and formatted before deployment. You can run: + ```bash npm run lint npm run format @@ -127,6 +129,7 @@ This command compiles the application and outputs the files to the `apps/web/dis To deploy the BailApp to Firebase Hosting, follow these steps: 1. Build the application: + ```bash npm run build ``` @@ -139,9 +142,11 @@ To deploy the BailApp to Firebase Hosting, follow these steps: ### Running Locally To run the application locally for testing: + ```bash npm run dev ``` + This command starts the development server, allowing you to preview your changes in real-time. ## Conclusion diff --git a/docs/docs/getting-started.md b/docs/docs/getting-started.md index e3d3c83..3762735 100644 --- a/docs/docs/getting-started.md +++ b/docs/docs/getting-started.md @@ -1,7 +1,7 @@ --- -title: "Getting Started with BailApp" -description: "A comprehensive guide to setting up the development environment, installing dependencies, and running the BailApp PWA locally." -icon: "πŸš€" +title: 'Getting Started with BailApp' +description: 'A comprehensive guide to setting up the development environment, installing dependencies, and running the BailApp PWA locally.' +icon: 'πŸš€' order: 1 --- diff --git a/docs/docs/routing.md b/docs/docs/routing.md index 1368cd1..eec7170 100644 --- a/docs/docs/routing.md +++ b/docs/docs/routing.md @@ -3,7 +3,8 @@ title: "Routing Documentation" description: "Comprehensive guide to the routing structure in Bailapp, including pages, dynamic segments, and navigation patterns." icon: "πŸ—ΊοΈ" order: 3 -``` + +```` # Routing Documentation @@ -45,7 +46,7 @@ The following routes are defined in the application: The navigation state is structured as follows: -- **Toast Message**: +- **Toast Message**: - `location.state?.toast` - Type: `{ message: string; type: 'success' | 'info' | 'error' } | null` - On render, if present, it is stored in local component state and cleared via `history.replaceState`. @@ -54,20 +55,21 @@ The navigation state is structured as follows: The following hooks are utilized for routing: -- **useParams**: +- **useParams**: ```typescript const { id } = useParams<{ id: string }>(); - ``` -- **useSearchParams**: +```` + +- **useSearchParams**: ```typescript const [searchParams] = useSearchParams(); const ownerId = searchParams.get('ownerId'); ``` -- **useLocation**: +- **useLocation**: ```typescript const location = useLocation(); ``` -- **useNavigate**: +- **useNavigate**: ```typescript const navigate = useNavigate(); ``` @@ -82,7 +84,7 @@ In the `ChoreographyDetail` component, you can access the dynamic segment and qu // apps/web/src/pages/ChoreographyDetail.tsx const { id } = useParams<{ id: string }>(); const [searchParams] = useSearchParams(); -const ownerId = searchParams.get('ownerId'); // Public view key +const ownerId = searchParams.get('ownerId'); // Public view key const isViewingPublic = ownerId && ownerId !== user?.uid; ``` From 4bb9f0795a5b188e7dfa0b239668a327ea8d6a65 Mon Sep 17 00:00:00 2001 From: Pol Thomas Date: Mon, 15 Dec 2025 17:29:00 +0100 Subject: [PATCH 3/3] Update App.tsx --- apps/web/src/App.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index bc39f5a..fbd999b 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -29,8 +29,6 @@ const queryClient = new QueryClient({ }, }); -// TODO: Allow users to update videos !! - // Disable SplashScreen and PWA Install Prompt in development const isProduction = import.meta.env.PROD;