From 1028613cadf439851ee8bf2f1a6733bbbd027e45 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Thu, 12 Sep 2024 19:47:50 -0300 Subject: [PATCH] import via preact/hooks --- bin/mkicons | 0 etc/webpack.common.js | 2 +- package.json | 6 +++--- src/js/hooks/useWebService.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) mode change 100755 => 100644 bin/mkicons diff --git a/bin/mkicons b/bin/mkicons old mode 100755 new mode 100644 diff --git a/etc/webpack.common.js b/etc/webpack.common.js index 80410ea..57fbaed 100644 --- a/etc/webpack.common.js +++ b/etc/webpack.common.js @@ -48,7 +48,7 @@ module.exports = { }), new CleanWebpackPlugin(), new webpack.ProvidePlugin({ - React: ['preact/compat'] + React: ["preact/compat"] }), ], } diff --git a/package.json b/package.json index 1cd548b..eccfea7 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,9 @@ "webExt": { "sourceDir": "build/production" }, + "dependencies": { + "preact": "^10.23.2" + }, "devDependencies": { "@testing-library/jest-dom": "^6.4", "@testing-library/react": "^16.0", @@ -32,8 +35,5 @@ "build:development": "npx webpack --config etc/webpack.development.js", "test": "npx jest --config etc/jest.config.js test", "eslint": "npx eslint --config etc/eslint.config.mjs src/" - }, - "dependencies": { - "preact": "^10.23.2" } } diff --git a/src/js/hooks/useWebService.ts b/src/js/hooks/useWebService.ts index 2c8bce8..70d8f26 100644 --- a/src/js/hooks/useWebService.ts +++ b/src/js/hooks/useWebService.ts @@ -1,4 +1,4 @@ -import { useEffect, useState } from "react"; +import { useEffect, useState } from "preact/hooks"; import { TResponse, Response } from "~/lib/response"; type Maybe = T | null;