Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

509 B
Raw Blame
"use client";

import { PropsWithChildren, createContext, useState } from "react";

export const EventsContext = createContext<{
  exportQueryString?: string;
  setExportQueryString?: (queryString: string) => void;
}>({});

export function EventsProvider({ children }: PropsWithChildren) {
  const [exportQueryString, setExportQueryString] = useState<string>();

  return (
    <EventsContext.Provider value={{ exportQueryString, setExportQueryString }}>
      {children}
    </EventsContext.Provider>
  );
}