Remove unused code
Came across this when trying to migrate off bootstrap in the few remaining places, this code is unused and just removing it instead of doing a migration of it to mui.
This commit is contained in:
parent
86e4cffb8e
commit
e84b989484
4 changed files with 1 additions and 80 deletions
|
@ -1,20 +0,0 @@
|
|||
import { styled } from "@mui/material";
|
||||
import { Button } from "react-bootstrap";
|
||||
const Container = styled("div")`
|
||||
position: fixed;
|
||||
bottom: 7%;
|
||||
right: 2%;
|
||||
align-self: flex-end;
|
||||
`;
|
||||
|
||||
interface Iprops {
|
||||
onClick: () => void;
|
||||
}
|
||||
|
||||
export default function ReportAbuse(props: Iprops) {
|
||||
return (
|
||||
<Container>
|
||||
<Button onClick={props.onClick}>report abuse?</Button>
|
||||
</Container>
|
||||
);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
export enum REPORT_REASON {
|
||||
COPYRIGHT = "COPYRIGHT",
|
||||
MALICIOUS_CONTENT = "MALICIOUS_CONTENT",
|
||||
}
|
|
@ -4,14 +4,9 @@ import HTTPService from "@ente/shared/network/HTTPService";
|
|||
import { getEndpoint } from "@ente/shared/network/api";
|
||||
import { logError } from "@ente/shared/sentry";
|
||||
import localForage from "@ente/shared/storage/localForage";
|
||||
import { REPORT_REASON } from "constants/publicCollection";
|
||||
import { Collection, CollectionPublicMagicMetadata } from "types/collection";
|
||||
import { EncryptedEnteFile, EnteFile } from "types/file";
|
||||
import {
|
||||
AbuseReportDetails,
|
||||
AbuseReportRequest,
|
||||
LocalSavedPublicCollectionFiles,
|
||||
} from "types/publicCollection";
|
||||
import { LocalSavedPublicCollectionFiles } from "types/publicCollection";
|
||||
import { decryptFile, mergeMetadata, sortFiles } from "utils/file";
|
||||
|
||||
const ENDPOINT = getEndpoint();
|
||||
|
@ -376,30 +371,6 @@ export const verifyPublicCollectionPassword = async (
|
|||
}
|
||||
};
|
||||
|
||||
export const reportAbuse = async (
|
||||
token: string,
|
||||
url: string,
|
||||
reason: REPORT_REASON,
|
||||
details: AbuseReportDetails,
|
||||
) => {
|
||||
try {
|
||||
if (!token) {
|
||||
return;
|
||||
}
|
||||
const abuseReportRequest: AbuseReportRequest = { url, reason, details };
|
||||
|
||||
await HTTPService.post(
|
||||
`${ENDPOINT}/public-collection/report-abuse`,
|
||||
abuseReportRequest,
|
||||
null,
|
||||
{ "X-Auth-Access-Token": token },
|
||||
);
|
||||
} catch (e) {
|
||||
logError(e, "failed to post abuse report");
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
|
||||
export const removePublicCollectionWithFiles = async (
|
||||
collectionUID: string,
|
||||
collectionKey: string,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { TimeStampListItem } from "components/PhotoList";
|
||||
import { REPORT_REASON } from "constants/publicCollection";
|
||||
import { PublicURL } from "types/collection";
|
||||
import { EnteFile } from "types/file";
|
||||
|
||||
|
@ -17,31 +16,6 @@ export interface LocalSavedPublicCollectionFiles {
|
|||
files: EnteFile[];
|
||||
}
|
||||
|
||||
export interface AbuseReportRequest {
|
||||
url: string;
|
||||
reason: REPORT_REASON;
|
||||
details: AbuseReportDetails;
|
||||
}
|
||||
|
||||
export interface AbuseReportDetails {
|
||||
fullName: string;
|
||||
email: string;
|
||||
comment: string;
|
||||
signature: string;
|
||||
onBehalfOf: string;
|
||||
jobTitle: string;
|
||||
address: Address;
|
||||
}
|
||||
|
||||
export interface Address {
|
||||
street: string;
|
||||
city: string;
|
||||
state: string;
|
||||
country: string;
|
||||
postalCode: string;
|
||||
phone: string;
|
||||
}
|
||||
|
||||
export type SetPublicShareProp = React.Dispatch<
|
||||
React.SetStateAction<PublicURL>
|
||||
>;
|
||||
|
|
Loading…
Add table
Reference in a new issue