This repository has been archived on 2026-01-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
nextjs-serve-actions/contexts/ProfileContextProvider.tsx
2024-05-23 16:55:29 +02:00

17 lines
379 B
TypeScript

import { useState } from 'react';
import { ProfileContext } from './ProfileContext';
export function ProfileContextProvider({
children
}: {
children: React.ReactNode;
}) {
const [profile, setProfile] = useState<string | undefined>(undefined);
return (
<ProfileContext.Provider value={{ profile, setProfile }}>
{children}
</ProfileContext.Provider>
);
}