small change

This commit is contained in:
TaylorS15
2023-02-22 18:34:20 -05:00
parent 91df648767
commit 355d6e3cf2
2 changed files with 22 additions and 21 deletions

View File

@@ -33,23 +33,17 @@ export async function getDocs(): Promise<Doc[] | null> {
export async function getLocalApiKey(): Promise<string | null> {
try {
const key = localStorage.getItem('DocsGPTApiKey');
if (key) {
return key;
}
return null;
return key;
} catch (error) {
console.log(error);
return null;
}
}
export async function getLocalRecentDocs(): Promise<Doc | null> {
export async function getLocalRecentDocs(): Promise<string | null> {
try {
const doc = localStorage.getItem('DocsGPTRecentDocs');
if (doc) {
return JSON.parse(doc);
}
return null;
return doc;
} catch (error) {
console.log(error);
return null;