Refactor SWR imports: consolidate fetcher and mutationFetcher into units/swr, update component imports accordingly
parent
0468af03be
commit
338aa17fe8
|
@ -2,8 +2,7 @@ import React from "react";
|
|||
import ReleaseNotesList from "./ReleaseNotesList";
|
||||
import TimelineComponent from "../timeline/TimelineComponent";
|
||||
import { endpoints } from "../../../utils/api";
|
||||
import useSWR from "swr";
|
||||
import { fetcher } from "utils/swr";
|
||||
import { useSWR, fetcher } from "units/swr";
|
||||
import { blip } from "utils";
|
||||
import { dtos } from "types";
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import React from "react";
|
||||
import SystemVersionComponent from "./SystemVersionComponent";
|
||||
import { endpoints } from "../../../utils/api";
|
||||
import useSWR from "swr";
|
||||
import { fetcher } from "utils/swr";
|
||||
import { useSWR, fetcher } from "units/swr";
|
||||
import { blip } from "utils";
|
||||
import { dtos } from "types";
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@ import CacheSettingsComponent from "./CacheSettingsComponent";
|
|||
import { useTranslation } from "react-i18next";
|
||||
import { endpoints } from "utils/api";
|
||||
import { blip } from "utils";
|
||||
import useSWRMutation from "swr/mutation";
|
||||
import { Key } from "swr";
|
||||
import { mutationFetcher } from "utils/swr";
|
||||
import { useSWRMutation, mutationFetcher, Key } from "units/swr";
|
||||
|
||||
const CacheSettingsContainer: React.FC = () => {
|
||||
const { t } = useTranslation();
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import React, { useState, useContext, useMemo, ReactNode } from "react";
|
||||
import { endpoints } from "../utils/api";
|
||||
import { PermissionsDto } from "types/dtos";
|
||||
import useSWR from "swr";
|
||||
import { fetcher } from "utils/swr";
|
||||
import { useSWR, fetcher } from "units/swr";
|
||||
import { blip } from "utils";
|
||||
|
||||
const permissionCodes = {
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
import useSWR from "swr";
|
||||
import type { Key } from "swr";
|
||||
import useSWRMutation from "swr/mutation";
|
||||
|
||||
export * from "./fetchers";
|
||||
|
||||
export { useSWR, useSWRMutation };
|
||||
export type { Key };
|
Loading…
Reference in New Issue