repo_description: Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿
repo_topics: blockchain crypto dapp graphql hacktoberfest lens-protocol nextjs react social-media tailwindcss turborepo typescript vitest wagmi web3
code: import { LENS_MEDIA_SNAPSHOT_URL } from "@/data/constants";
  
  const imageKit = (url: string, name?: string): string => {
    if (!url) {
      return "";
    }
  
    if (url.includes(LENS_MEDIA_SNAPSHOT_URL)) {
      const splitUrl = url.split("/");
      const path = splitUrl[splitUrl.length - 1];
  
      return name ? `${LENS_MEDIA_SNAPSHOT_URL}/${name}/${path}` : url;
    }
  
    return url;
  };
  
  export default imageKit;
  