🐛 fix fixed a bug where the form could not be filled out

This commit is contained in:
kawamataryo 2024-01-14 06:14:47 +09:00
parent b9c51dd758
commit 7b7866d2e4

View File

@ -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";
@ -45,7 +45,7 @@ function IndexPopup() {
});
};
const loadCredentialsFromStorage = async () => {
const loadCredentialsFromStorage = useCallback(async () => {
chrome.storage.local.get(
[STORAGE_KEYS.BSKY_PASSWORD, STORAGE_KEYS.BSKY_USER_ID],
(result) => {
@ -53,7 +53,7 @@ function IndexPopup() {
setUserId(result[STORAGE_KEYS.BSKY_USER_ID] || "");
},
);
};
}, []);
const searchBskyUser = async (e?: FormEvent) => {
if (e) {