mirror of https://github.com/astral-sh/ruff
fix; function signatures
This commit is contained in:
parent
72544413e2
commit
b23ce09da3
|
|
@ -16,12 +16,12 @@ export default function Chrome() {
|
|||
|
||||
const [theme, setTheme] = useTheme();
|
||||
|
||||
const handleShare = useCallback(() => {
|
||||
const handleShare = useCallback(async () => {
|
||||
if (settings == null || pythonSource == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
persist(settings, pythonSource).catch((error) =>
|
||||
await persist(settings, pythonSource).catch((error) =>
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(`Failed to share playground: ${error}`),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export default function Header({
|
|||
version: string | null;
|
||||
onChangeTheme: (theme: Theme) => void;
|
||||
onReset?(): void;
|
||||
onShare: () => void;
|
||||
onShare: () => Promise<void>;
|
||||
}) {
|
||||
return (
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -48,11 +48,11 @@ export default function Playground() {
|
|||
|
||||
usePersistLocally(files);
|
||||
|
||||
const handleShare = useCallback(() => {
|
||||
const handleShare = useCallback(async () => {
|
||||
const serialized = serializeFiles(files);
|
||||
|
||||
if (serialized != null) {
|
||||
persist(serialized).catch((error) => {
|
||||
await persist(serialized).catch((error) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error("Failed to share playground", error);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue