"use client"

import { useEffect } from "react"
import { clearMailBackgroundDom } from "@/lib/mail-settings/mail-background-dom"

/** Marks document as Drive scope: no mail wallpaper. */
export function DriveRouteScope() {
  useEffect(() => {
    const html = document.documentElement
    html.dataset.routeScope = "drive"
    clearMailBackgroundDom(html)

    return () => {
      delete html.dataset.routeScope
    }
  }, [])

  return null
}
