mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 23:08:48 +00:00
starting of widget refactoring
This commit is contained in:
parent
d6f6ea9dba
commit
562235f828
42 changed files with 337 additions and 301 deletions
|
@ -4,14 +4,14 @@ import { useTranslation } from "next-i18next";
|
|||
import Widget from "../widget";
|
||||
import Block from "../block";
|
||||
|
||||
import { formatApiUrl } from "utils/api-helpers";
|
||||
import { formatProxyUrl } from "utils/api-helpers";
|
||||
|
||||
export default function Npm({ service }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const config = service.widget;
|
||||
|
||||
const { data: infoData, error: infoError } = useSWR(formatApiUrl(config, "nginx/proxy-hosts"));
|
||||
const { data: infoData, error: infoError } = useSWR(formatProxyUrl(config, "nginx/proxy-hosts"));
|
||||
|
||||
if (infoError) {
|
||||
return <Widget error={t("widget.api_error")} />;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue