refactoring (#178)

* unify components import

* refactor config and app context

* refactor icons

* refactor date, error, mxid and storage

* refactor synapse utils
This commit is contained in:
Aine
2024-11-25 12:51:05 +02:00
committed by GitHub
parent ea0c7a73fd
commit 392fec3186
35 changed files with 200 additions and 206 deletions

View File

@@ -32,9 +32,8 @@ import {
} from "react-admin";
import { useMutation } from "@tanstack/react-query";
import { dateParser } from "./date";
import { dateParser } from "../utils/date";
import { DeleteMediaParams, SynapseDataProvider } from "../synapse/dataProvider";
import storage from "../storage";
import { fetchAuthenticatedMedia } from "../utils/fetchMedia";
const DeleteMediaDialog = ({ open, onClose, onSubmit }) => {
@@ -385,7 +384,7 @@ export const MediaIDField = ({ source }) => {
if (!record) {
return null;
}
const homeserver = storage.getItem("home_server");
const homeserver = localStorage.getItem("home_server");
const mediaID = get(record, source)?.toString();
if (!mediaID) {