Instant Quote







Skip to main content
www.qualityqueens.co.nz

Quality Queens, Quality cleaning

Find your official floor area sqft on the link below

import { useEffect, useRef, useState } from 'react'; import gsap from 'gsap'; import { ScrollTrigger } from 'gsap/ScrollTrigger'; import { Home, Clock, DollarSign } from 'lucide-react'; import { calculatorConfig } from '../config'; gsap.registerPlugin(ScrollTrigger); export function Calculator() { const sectionRef = useRef(null); const titleRef = useRef(null); const calculatorRef = useRef(null); const [squareMeters, setSquareMeters] = useState(calculatorConfig.sliderDefault); const [estimatedHours, setEstimatedHours] = useState(2); const [estimatedPrice, setEstimatedPrice] = useState(100); const triggersRef = useRef([]); // Calculate estimated hours and price based on square meters useEffect(() => { // Base calculation: 1 hour per 60 sqm, with minimum of 2 hours const baseHours = Math.max(calculatorConfig.minHours, Math.ceil(squareMeters / 60)); setEstimatedHours(baseHours); // Price calculation: hourly rate * hours const price = baseHours * calculatorConfig.ratePerHour; setEstimatedPrice(price); }, [squareMeters]); useEffect(() => { const section = sectionRef.current; if (!section) return; const trigger = ScrollTrigger.create({ trigger: section, start: 'top 80%', onEnter: () => { const tl = gsap.timeline(); // Title animation tl.fromTo( titleRef.current, { y: 60, opacity: 0 }, { y: 0, opacity: 1, duration: 0.8, ease: 'expo.out' } ); // Calculator card animation tl.fromTo( calculatorRef.current, { y: 80, opacity: 0, rotateX: 15 }, { y: 0, opacity: 1, rotateX: 0, duration: 1, ease: 'expo.out' }, '-=0.4' ); }, once: true, }); triggersRef.current.push(trigger); return () => { triggersRef.current.forEach((t) => t.kill()); triggersRef.current = []; }; }, []); const handleSliderChange = (e: React.ChangeEvent) => { setSquareMeters(Number(e.target.value)); }; return (
{/* Background gradient */}
{/* Left side - Title and description */}

Estimate my
Home Clean

{calculatorConfig.description}

This tool helps you estimate the duration of a typical cleaning session, helping you understand how long an average clean will take.

Click below to visit homes.co.nz, enter your address, and confirm your total floor area in square metres, then you can use the handy slider to estimate your cleaning time.

{calculatorConfig.findHomeText}
{/* Right side - Calculator */}

Home Cleaning Time Calculator

A simple calculator designed to provide you with an estimated booking time for your home cleaning service.

{/* Slider section */}
{squareMeters} m²
{/* Custom slider */}
{calculatorConfig.sliderMin} m² {calculatorConfig.sliderMax} m²

Adjust the slider based on your home's total floor sqm space. *Note that we have a minimum service time of {calculatorConfig.minHours} hours for all bookings.

{/* Results section */}
{/* Estimated Time */}
{calculatorConfig.estimatedTimeLabel}
{estimatedHours.toFixed(2)} hours
{/* Estimated Price */}
{calculatorConfig.estimatedPriceLabel}
${estimatedPrice} NZD

{calculatorConfig.noteText}

{calculatorConfig.disclaimerText}

); }