Skip to content

Commit

Permalink
env cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sadmann7 committed Jul 3, 2023
1 parent b8e32ac commit c5cf0bd
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 35 deletions.
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
# should be updated accordingly.

# App

# Determines the runtime environment
NEXTJS_RUNTIME="node" # or "edge"

# Use the production URL when deploying to production
NEXT_PUBLIC_APP_URL="http://localhost:3000"

Expand Down
28 changes: 14 additions & 14 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand All @@ -116,13 +116,13 @@ the community.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.
3 changes: 1 addition & 2 deletions src/app/(auth)/signout/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { env } from "@/env.mjs"
import { LogOutButtons } from "@/components/auth/logout-buttons"
import { Header } from "@/components/header"
import { Shell } from "@/components/shell"

// Running out of edge function execution units on vercel free plan
export const runtime = env.NEXTJS_RUNTIME
// export const runtime = "edge"

export default function SignOutPage() {
return (
Expand Down
5 changes: 2 additions & 3 deletions src/app/(auth)/sso-callback/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { env } from "@/env.mjs"
import type { HandleOAuthCallbackParams } from "@clerk/types"
import { type HandleOAuthCallbackParams } from "@clerk/types"

import SSOCallback from "@/components/auth/sso-callback"
import { Shell } from "@/components/shell"

// Running out of edge function execution units on vercel free plan
export const runtime = env.NEXTJS_RUNTIME
// export const runtime = "edge"

export interface SSOCallbackPageProps {
searchParams: HandleOAuthCallbackParams
Expand Down
4 changes: 2 additions & 2 deletions src/app/(dashboard)/dashboard/stores/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { env } from "@/env.mjs"
import type { Metadata } from "next"
import Link from "next/link"
import { redirect } from "next/navigation"
import { db } from "@/db"
import { stores } from "@/db/schema"
import { env } from "@/env.mjs"
import { currentUser } from "@clerk/nextjs"
import { eq } from "drizzle-orm"

Expand All @@ -20,7 +20,7 @@ import { Header } from "@/components/header"
import { Shell } from "@/components/shell"

// Running out of edge function execution units on vercel free plan
export const runtime = env.NEXTJS_RUNTIME
// export const runtime = "edge"

export const metadata: Metadata = {
metadataBase: new URL(env.NEXT_PUBLIC_APP_URL),
Expand Down
3 changes: 1 addition & 2 deletions src/app/(lobby)/categories/[category]/[subcategory]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { env } from "@/env.mjs"
import { type Product } from "@/db/schema"

import { toTitleCase, unslugify } from "@/lib/utils"
Expand All @@ -9,7 +8,7 @@ import { getProductsAction } from "@/app/_actions/product"
import { getStoresAction } from "@/app/_actions/store"

// Running out of edge function execution units on vercel free plan
export const runtime = env.NEXTJS_RUNTIME
// export const runtime = "edge"

interface SubcategoryPageProps {
params: {
Expand Down
3 changes: 1 addition & 2 deletions src/app/(lobby)/categories/[category]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { env } from "@/env.mjs"
import { type Product } from "@/db/schema"

import { toTitleCase } from "@/lib/utils"
Expand All @@ -9,7 +8,7 @@ import { getProductsAction } from "@/app/_actions/product"
import { getStoresAction } from "@/app/_actions/store"

// Running out of edge function execution units on vercel free plan
export const runtime = env.NEXTJS_RUNTIME
// export const runtime = "edge"

interface CategoryPageProps {
params: {
Expand Down
3 changes: 1 addition & 2 deletions src/app/(lobby)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { env } from "@/env.mjs"
import Image from "next/image"
import Link from "next/link"
import { db } from "@/db"
Expand All @@ -25,7 +24,7 @@ import { ProductCard } from "@/components/product-card"
import { Shell } from "@/components/shell"

// Running out of edge function execution units on vercel free plan
export const runtime = env.NEXTJS_RUNTIME
// export const runtime = "edge"

export default async function IndexPage() {
const allProducts = await db
Expand Down
4 changes: 2 additions & 2 deletions src/app/(lobby)/products/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { env } from "@/env.mjs"
import { type Metadata } from "next"
import { products } from "@/db/schema"
import { env } from "@/env.mjs"

import { Header } from "@/components/header"
import { Products } from "@/components/products"
Expand All @@ -9,7 +9,7 @@ import { getProductsAction } from "@/app/_actions/product"
import { getStoresAction } from "@/app/_actions/store"

// Running out of edge function execution units on vercel free plan
export const runtime = env.NEXTJS_RUNTIME
// export const runtime = "edge"

export const metadata: Metadata = {
metadataBase: new URL(env.NEXT_PUBLIC_APP_URL),
Expand Down
4 changes: 4 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { env } from "@/env.mjs"

import "@/styles/globals.css"

import type { Metadata } from "next"
Expand Down Expand Up @@ -55,6 +56,9 @@ export const metadata: Metadata = {
images: [`${siteConfig.url}/og.jpg`],
creator: "@sadmann7",
},
icons: {
icon: "/favicon.ico",
},
}

interface RootLayoutProps {
Expand Down
2 changes: 0 additions & 2 deletions src/env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const env = createEnv({
STRIPE_API_KEY: z.string(),
STRIPE_WEBHOOK_SECRET: z.string(),
STRIPE_PRO_STORE_PRICE_ID: z.string(),
NEXTJS_RUNTIME: z.string(),
},

/**
Expand Down Expand Up @@ -48,7 +47,6 @@ export const env = createEnv({
STRIPE_API_KEY: process.env.STRIPE_API_KEY,
STRIPE_WEBHOOK_SECRET: process.env.STRIPE_WEBHOOK_SECRET,
STRIPE_PRO_STORE_PRICE_ID: process.env.STRIPE_PRO_STORE_PRICE_ID,
NEXTJS_RUNTIME: process.env.NEXTJS_RUNTIME,
},
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation.
Expand Down

0 comments on commit c5cf0bd

Please sign in to comment.