12 lines
299 B
TypeScript
12 lines
299 B
TypeScript
"use client";
|
|
|
|
import useLocalStorageState from "use-local-storage-state";
|
|
|
|
export function useApiKey(): [string | null, (key: string | null) => void] {
|
|
const [apiKey, setApiKey] = useLocalStorageState<string | null>("together_api_key", { defaultValue: null });
|
|
return [apiKey, setApiKey];
|
|
}
|
|
|
|
|
|
|