Skip to content
Merged

Test #35

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions apps/web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
9 changes: 6 additions & 3 deletions docs/docs/architecture.md
Original file line number Diff line number Diff line change
@@ -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
---

Expand Down Expand Up @@ -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[];
Expand All @@ -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[];
Expand Down
11 changes: 8 additions & 3 deletions docs/docs/deployment.md
Original file line number Diff line number Diff line change
@@ -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
---

Expand Down Expand Up @@ -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
Expand All @@ -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
```
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -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
---

Expand Down
18 changes: 10 additions & 8 deletions docs/docs/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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`.
Expand All @@ -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();
```
Expand All @@ -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;
```

Expand Down