Skip to content

Commit

Permalink
🐛 fix fixed a bug where the form could not be filled out
Browse files Browse the repository at this point in the history
  • Loading branch information
kawamataryo committed Jan 14, 2024
1 parent b9c51dd commit 7b7866d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/popup.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type FormEvent, useEffect, useState } from "react";
import { type FormEvent, useCallback, useEffect, useState } from "react";
import { P, match } from "ts-pattern";

import "./style.css";
Expand Down Expand Up @@ -45,15 +45,15 @@ function IndexPopup() {
});
};

const loadCredentialsFromStorage = async () => {
const loadCredentialsFromStorage = useCallback(async () => {
chrome.storage.local.get(
[STORAGE_KEYS.BSKY_PASSWORD, STORAGE_KEYS.BSKY_USER_ID],
(result) => {
setPassword(result[STORAGE_KEYS.BSKY_PASSWORD] || "");
setUserId(result[STORAGE_KEYS.BSKY_USER_ID] || "");
},
);
};
}, []);

const searchBskyUser = async (e?: FormEvent) => {
if (e) {
Expand Down

0 comments on commit 7b7866d

Please sign in to comment.