fix; function signatures

This commit is contained in:
mahiro72 2025-12-12 20:00:01 +09:00
parent 72544413e2
commit b23ce09da3
3 changed files with 5 additions and 5 deletions

View File

@ -16,12 +16,12 @@ export default function Chrome() {
const [theme, setTheme] = useTheme(); const [theme, setTheme] = useTheme();
const handleShare = useCallback(() => { const handleShare = useCallback(async () => {
if (settings == null || pythonSource == null) { if (settings == null || pythonSource == null) {
return; return;
} }
persist(settings, pythonSource).catch((error) => await persist(settings, pythonSource).catch((error) =>
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.error(`Failed to share playground: ${error}`), console.error(`Failed to share playground: ${error}`),
); );

View File

@ -21,7 +21,7 @@ export default function Header({
version: string | null; version: string | null;
onChangeTheme: (theme: Theme) => void; onChangeTheme: (theme: Theme) => void;
onReset?(): void; onReset?(): void;
onShare: () => void; onShare: () => Promise<void>;
}) { }) {
return ( return (
<div <div

View File

@ -48,11 +48,11 @@ export default function Playground() {
usePersistLocally(files); usePersistLocally(files);
const handleShare = useCallback(() => { const handleShare = useCallback(async () => {
const serialized = serializeFiles(files); const serialized = serializeFiles(files);
if (serialized != null) { if (serialized != null) {
persist(serialized).catch((error) => { await persist(serialized).catch((error) => {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.error("Failed to share playground", error); console.error("Failed to share playground", error);
}); });