import React, { createContext, useState } from 'react'

// Create the context
export const DataContext = createContext()

// Create the provider component
export const DataProvider = ({ children }) => {
  const [data, setData] = useState(null) // State to hold data

  return <DataContext.Provider value={{ data, setData }}>{children}</DataContext.Provider>
}
