chore(common/strings): remove unused code

This commit is contained in:
Aminejv 2023-01-17 17:04:13 +01:00
parent 65d88c608b
commit 86fc5a49c8

View File

@ -99,20 +99,6 @@ export const createQueryParams = (params) => {
return query;
};
export const getCIDFromIPFS = (url) => {
// NOTE(andrew)
const cid = url.includes("/ipfs/")
? // pull cid from a path format gateway
url.split("/ipfs/")[1]
: // pull cid from a subdomain format gateway
url.match(
// regex here performs https://{cid}.ipfs.slate.textile.io => [https://{cid}, {cid}]
/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/i
)[1];
return cid;
};
export const formatAsUploadMessage = (added, skipped, slate = false) => {
let message = `${added || 0} file${added !== 1 ? "s" : ""} added${
slate ? " to collection" : ""