import * as React from 'react'; import allCountries from './countries.json'; export const CountriesContext = React.createContext(null); interface CountriesProviderProps { children: React.ReactNode; countryCode?: string; } const CountriesProvider = ({ children, countryCode }: CountriesProviderProps) => { const value = countryCode ? allCountries.find((country) => country.code === countryCode) : allCountries; return {children}; }; export default CountriesProvider;