Layout Components
Layout components provide the structural foundation for the Tienda ETCA application. These components handle navigation, branding, and consistent page structure across all views.Header Component
The Header component provides primary navigation and access to key application features. File:src/components/Header.jsx
Overview
The Header is a persistent navigation bar that appears on most pages, providing access to main sections, shopping cart, and user authentication.
Component Structure
Header.jsx
Features
Navigation Menu
Navigation Menu
Branding
Branding
Displays the ETCA logo and school name:
- Logo image:
ETCAicon150.png - School name: “ESCUELA DE TIRO CON ARCO”
Shopping Cart
Shopping Cart
Interactive cart button showing item count:
- Displays current cart item count from CartContext
- Opens Cart drawer on click
- Uses Font Awesome cart icon
- Format:
[count]with shopping cart icon
User Authentication
User Authentication
Access buttons for user features:
- Login button - Links to
/login - Admin button - Links to
/admindashboard - Uses Font Awesome icons
Context Dependencies
cartCount- Number of items in cartisCartOpen- Boolean for cart drawer statesetCartOpen- Function to toggle cart drawer
Navigation Structure
Styling
CSS File:src/components/style/Header.css
The Header uses custom CSS for layout and styling. The navigation is responsive and adapts to different screen sizes.
Footer Component
The Footer provides site-wide information, navigation, and contact details. File:src/components/Footer.jsx
Overview
A multi-column footer displaying company information, navigation links, contact details, and accepted payment methods.Component Structure
Footer.jsx
Features
Company Info
- Company description
- Shipping information
- Service areas (CABA, GBA, Argentina)
Navigation
- Quick links to main pages
- Uses React Router Link
- Mirrors header navigation
Contact
- Location: CABA, Argentina
- Email link
- Phone number
- Payment methods
Footer Sections
- Column 1
- Column 2
- Column 3
Company & Shipping
- ETCA branding
- Company description
- Shipping information:
- Express shipping in CABA and GBA
- Nationwide delivery in 72 hours
Styling
CSS File:src/components/style/Footer.css
The Footer uses a multi-column responsive layout that adapts to different screen sizes.
Main Components
Two hero section components providing flexible content layouts.Main Component
File:src/components/Main.jsx
Overview
A Bootstrap-based hero section with text content on the left and an image on the right.Props
Section heading text
Description or body text for the section
Button label text
Image URL or path for the hero image
Component Structure
Main.jsx
Usage Example
Example from Home.jsx
Layout Features
- Two-column Bootstrap grid - Responsive layout using
col-md-6 - Text on left - Heading, description, and CTA button
- Image on right - Responsive image with max height constraint
- Dark theme - Uses Bootstrap
bg-dark text-lightclasses - Styling - Rounded corners and shadow for depth
Main2 Component
File:src/components/Main2.jsx
Overview
Identical to Main component but with reversed layout - image on the left, text on the right.Props
Section heading text
Description or body text for the section
Button label text
Image URL or path for the hero image
Component Structure
Main2.jsx
Usage Example
Example from Home.jsx
Layout Features
- Two-column Bootstrap grid - Responsive layout using
col-md-6 - Image on left - Responsive image with max height constraint
- Text on right - Heading, description, and CTA button
- Dark theme - Uses Bootstrap
bg-dark text-lightclasses - Styling - Rounded corners and shadow for depth
Layout Comparison
Responsive Design
All layout components are fully responsive:- Header: Adapts navigation for mobile devices
- Footer: Columns stack on smaller screens
- Main/Main2: Two-column layout becomes single-column on mobile (
col-md-6)
Dependencies
Related Documentation
Components Overview
See all available components
Context API
Learn about CartContext integration