Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions web-marketplace/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ NEXT_PUBLIC_AMPLITUDE_API_KEY = "804411ae5b6e49e09e76d968a4193ae3"
NEXT_PUBLIC_DEFAULT_COMMUNITY_PROJECTS_FILTER = "true"
NEXT_PUBLIC_GA_MEASUREMENT_ID = "G-9ENS4JTCWY"
NEXT_PUBLIC_IMAGE_STORAGE_BASE_URL = "https://regen-registry.s3.amazonaws.com/"
NEXT_PUBLIC_MARKETPLACE_APP_URL = "https://dev.app.regen.network"
NEXT_PUBLIC_SANITY_PROJECT_ID = "jm12rn9t"
NEXT_PUBLIC_SANITY_TAG = "default"
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID = "d6fdf2c8dd645ff3e6b444e551890c2b"
Expand Down Expand Up @@ -87,7 +86,6 @@ NEXT_PUBLIC_AMPLITUDE_API_KEY = "804411ae5b6e49e09e76d968a4193ae3"
NEXT_PUBLIC_DEFAULT_COMMUNITY_PROJECTS_FILTER = "true"
NEXT_PUBLIC_GA_MEASUREMENT_ID = "G-9ENS4JTCWY"
NEXT_PUBLIC_IMAGE_STORAGE_BASE_URL = "https://regen-registry.s3.amazonaws.com/"
NEXT_PUBLIC_MARKETPLACE_APP_URL = "https://dev.app.regen.network"
NEXT_PUBLIC_SANITY_PROJECT_ID = "jm12rn9t"
NEXT_PUBLIC_SANITY_TAG = "default"
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID = "d6fdf2c8dd645ff3e6b444e551890c2b"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { normalizeError } from 'legacy-pages/ErrorPage/ErrorPage.utils';

import ErrorView from 'web-components/src/components/views/ErrorView';

import unhappyBee from '../../public/png/unhappy-bee.png';
import unhappyBee from '../../../public/png/unhappy-bee.png';

export default function Error({ error }: { error: Error }) {
const { _ } = useLingui();
Expand Down
11 changes: 1 addition & 10 deletions web-marketplace/src/clients/regen/Regen.Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@ import { selectedLanguageAtom } from 'lib/atoms/languageSwitcher.atoms';
import { BRIDGE_BASKET_DENOM, BRIDGE_CLASS_ID, ORG_ENABLED } from 'lib/env';
import { useWallet } from 'lib/wallet/wallet';

// import { ApolloClientFactory } from 'lib/clients/apolloClientFactory';
import { AuthRoute } from 'components/atoms/AuthRoute';
import { KeplrOrAuthRoute } from 'components/atoms/KeplrOrAuthRoute';
import PageLoader from 'components/atoms/PageLoader';
import { RegistryLayout } from 'components/organisms/RegistryLayout/RegistryLayout';
import { registryLayoutLoader } from 'components/organisms/RegistryLayout/RegistryLayout.loader';

import { KeplrRoute } from '../../components/atoms';
import { ProjectMetadata } from '../../legacy-pages/ProjectMetadata/ProjectMetadata';
Expand Down Expand Up @@ -263,14 +261,7 @@ export const getRegenRoutes = ({
return createRoutesFromElements(
<>
{/* Main routes WITH header/footer */}
<Route
element={<RegistryLayout />}
loader={registryLayoutLoader({
queryClient: reactQueryClient,
apolloClient,
languageCode,
})}
>
<Route element={<RegistryLayout />}>
<Route path="/" element={<Outlet />} errorElement={<ErrorPage />}>
<Route
index
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,32 @@ export async function fetchHasPrefinanceProjects({
apolloClient: ApolloClient<NormalizedCacheObject>;
languageCode: string;
}): Promise<boolean> {
const allSanityProjects = await getFromCacheOrFetch({
query: getAllSanityProjectsQuery({ sanityClient, languageCode }),
reactQueryClient: queryClient,
});

const allOffChainProjects = await getFromCacheOrFetch({
query: getAllOffchainProjectsQuery({ client: apolloClient, languageCode }),
reactQueryClient: queryClient,
});
try {
const allSanityProjects = await getFromCacheOrFetch({
query: getAllSanityProjectsQuery({ sanityClient, languageCode }),
reactQueryClient: queryClient,
});

const prefinanceProjects =
allOffChainProjects?.data?.allProjects?.nodes?.filter(project => {
const sanityProject = allSanityProjects?.allProject?.find(
sanityProject =>
sanityProject.projectId === project?.id ||
sanityProject.projectId === project?.slug,
);
return sanityProject?.projectPrefinancing?.isPrefinanceProject;
const allOffChainProjects = await getFromCacheOrFetch({
query: getAllOffchainProjectsQuery({
client: apolloClient,
languageCode,
}),
reactQueryClient: queryClient,
});

return (prefinanceProjects?.length ?? 0) > 0;
const prefinanceProjects =
allOffChainProjects?.data?.allProjects?.nodes?.filter(project => {
const sanityProject = allSanityProjects?.allProject?.find(
sanityProject =>
sanityProject.projectId === project?.id ||
sanityProject.projectId === project?.slug,
);
return sanityProject?.projectPrefinancing?.isPrefinanceProject;
});

return (prefinanceProjects?.length ?? 0) > 0;
} catch (error) {
return false; // Return false if there's an error fetching projects
}
}

This file was deleted.

Loading
Loading