Skip to content

Commit

Permalink
Remove all Vercel details
Browse files Browse the repository at this point in the history
- Swap env vars for Netlify equivalents
- Change Vercel and Sanity to Netlify and CircleCI in Footer
  • Loading branch information
kylegach committed Oct 15, 2024
1 parent 5bea7cc commit 67fe9f8
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 129 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ coverage
# Turbo
.turbo

# Vercel
.vercel

# next.js
.next/
out/
Expand Down
3 changes: 0 additions & 3 deletions apps/addon-catalog/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ yarn-error.log*
# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
8 changes: 4 additions & 4 deletions apps/addon-catalog/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const basePath = process.env.NEXT_PUBLIC_BASE_PATH || '';
export const basePath = process.env.NEXT_PUBLIC_BASE_PATH ?? '';

const vercelUrl = process.env.VERCEL_URL || process.env.VERCEL_BRANCH_URL;
export const host = vercelUrl
? `https://${vercelUrl}`
const deployUrl = process.env.URL;
export const host = deployUrl
? `https://${deployUrl}`
: 'http://localhost:3001';
4 changes: 0 additions & 4 deletions apps/frontpage/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import {
globalSearchImportance,
} from '@repo/ui';
import { cn } from '@repo/utils';
import { SpeedInsights } from '@vercel/speed-insights/next';
import { GoogleAnalytics } from '@next/third-parties/google';
import { Analytics } from '@vercel/analytics/react';
import { Providers } from './providers';

import '@docsearch/css';
Expand Down Expand Up @@ -62,8 +60,6 @@ export default function RootLayout({
)}
>
<Providers>{children}</Providers>
<SpeedInsights />
<Analytics />
</body>
<GoogleAnalytics gaId="G-MN8NJ34M7T" />
</html>
Expand Down
4 changes: 2 additions & 2 deletions apps/frontpage/components/docs/footer/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { TreeProps } from '@repo/utils';
import { docsVersions } from '@repo/utils';
import { getAllTrees } from '../../../lib/get-all-trees';

const siteUrl = process.env.VERCEL_ENV === 'production';
const siteUrl = process.env.CONTEXT === 'production';

const schema = z.object({
comment: z.string().optional(),
Expand Down Expand Up @@ -509,7 +509,7 @@ export async function sendFeedback(
const path = slug.replace('/docs', '');

const hasValidOrigin = siteUrl
? headersList.get('origin') === process.env.VERCEL_URL
? headersList.get('origin') === process.env.URL
: true;
const hasValidReferer = headersList.get('referer')?.endsWith(path);

Expand Down
2 changes: 0 additions & 2 deletions apps/frontpage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
"@repo/utils": "*",
"@storybook/icons": "^1.2.9",
"@types/mdx": "^2.0.13",
"@vercel/analytics": "^1.3.1",
"@vercel/speed-insights": "^1.0.11",
"class-variance-authority": "^0.7.0",
"cookies-next": "^4.1.1",
"copy-to-clipboard": "^3.3.3",
Expand Down
40 changes: 0 additions & 40 deletions apps/frontpage/vercel.json

This file was deleted.

61 changes: 0 additions & 61 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/ui/src/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ export const Footer: FC<FooterProps> = ({ variant = 'system' }) => {
variant === 'home' && 'ui-text-white',
variant !== 'home' && 'ui-text-zinc-600 dark:ui-text-white',
)}
href="https://vercel.com"
href="https://netlify.com"
>
Vercel
Netlify
</a>{' '}
and{' '}
<a
Expand All @@ -130,9 +130,9 @@ export const Footer: FC<FooterProps> = ({ variant = 'system' }) => {
variant === 'home' && 'ui-text-white',
variant !== 'home' && 'ui-text-zinc-600 dark:ui-text-white',
)}
href="https://sanity.io"
href="https://circleci.com"
>
Sanity
CircleCI
</a>
</div>
</div>
Expand Down
13 changes: 7 additions & 6 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["**/.env.*local"],
"globalEnv": [
"GCP_CREDENTIALS",
"SKIP_IP_HASH",
"ALGOLIA_API_KEY",
"NEXT_PUBLIC_ALGOLIA_API_KEY",
"VERCEL_ENV",
"VERCEL_URL",
"ANALYZE",
"CONTEXT",
"GCP_CREDENTIALS",
"GITHUB_STORYBOOK_BOT_PAT",
"ANALYZE"
"NEXT_PUBLIC_ALGOLIA_API_KEY",
"NEXT_PUBLIC_BASE_PATH",
"SKIP_IP_HASH",
"URL"
],
"tasks": {
"lint": {
Expand Down

0 comments on commit 67fe9f8

Please sign in to comment.