Skip to content

Commit

Permalink
Remove pulling registry url from process.env in pgt.dev (#833)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarrenBaldwin07 authored Dec 6, 2024
1 parent 960cccd commit 24473f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 3 additions & 5 deletions ui/src/pages/extensions/[ext]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import InfoIcon from '@/Components/InfoIcon';
const Octocat = '/OctocatIcon.png';
const LinkIcon = '/LinkIcon.png';
const CopyIcon = '/copy.png';
const REGISTRY_URL =
process.env.NEXT_PUBLIC_API_BASE_URL || 'https://registry.pgtrunk.io';
const REGISTRY_URL = 'https://registry.pgtrunk.io';

export default function Page({
extension,
Expand Down Expand Up @@ -55,7 +54,7 @@ export default function Page({
}

const latestVersion: Extension = extension!;
const installText = `trunk install ${latestVersion.name}` ?? '';
const installText = `trunk install ${latestVersion.name}`;

const handleCopy = async () => {
try {
Expand Down Expand Up @@ -231,10 +230,9 @@ export async function getStaticPaths() {

console.log('********** BUILT PATHS **********');
return { paths, fallback: true };
// return { paths: [], fallback: true };
} catch (error) {
console.log('ERROR BUILDING PATHS', error);
return { paths: [] };
return { paths: [], fallback: true };
}
}

Expand Down
3 changes: 1 addition & 2 deletions ui/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import ExtGrid from '../Components/ExtGrid';
import { Category, CategoriesForGrid, Extension } from '@/types';
import Header from '@/Components/Header';

const REGISTRY_URL =
process.env.NEXT_PUBLIC_API_BASE_URL || 'https://registry.pgtrunk.io';
const REGISTRY_URL = 'https://registry.pgtrunk.io';

export const getStaticProps: GetStaticProps<{
categories: Category[];
Expand Down

0 comments on commit 24473f6

Please sign in to comment.