Skip to content

Commit

Permalink
removed some project specific values in favor of environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
tmanundercover committed Nov 27, 2023
1 parent 90602d6 commit 88546bc
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 17 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Application that serves as the website builder from React Components
REACT_APP_MESSAGING_SENDER_ID=
REACT_APP_APP_ID=
REACT_APP_FIREBASE_ANALYTICS_TRACKING_ID=
REACT_APP_BASE_ROUTE=
```

#### Firebase
Expand All @@ -48,6 +49,7 @@ Application that serves as the website builder from React Components
```
SANITY_PROJECTID=
SANITY_DB=development
SANITY_APIVERSION=
SANITY_API_TOKEN=
SENDGRID_API_KEY=
SENDGRID_FROM_EMAIL=
Expand Down
1 change: 1 addition & 0 deletions functions/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "functions",
"version": "0.3.0",
"scripts": {
"lint": "eslint --ext .js,.ts .",
"build": "tsc",
Expand Down
2 changes: 1 addition & 1 deletion functions/src/sanityClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const client = require("@sanity/client");
export const sanityClient = client({
projectId: process.env.SANITY_PROJECTID,
dataset: process.env.SANITY_DB,
apiVersion: "2021-03-25",
apiVersion: process.env.SANITY_APIVERSION,
token: process.env.SANITY_API_TOKEN,
useCdn: false,
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "the-handsomestnerd-internal",
"version": "0.2.0",
"version": "0.3.0",
"license": "GPL-3.0-or-later",
"private": true,
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->

<title>Chow Works</title>
<!-- <title>Chow Works</title>-->
<meta name="title" content="__META_OG_TITLE__"/>
<meta name="description" content="__META_DESCRIPTION__"/>
<meta name="og:title" content="__META_OG_TITLE__"/>
<meta name="og:description" content="__META_OG_DESCRIPTION__"/>
Expand Down
2 changes: 1 addition & 1 deletion sanityIo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "the-handsomest-nerd-sanity",
"private": true,
"version": "0.2.0",
"version": "0.3.0",
"description": "Sanity CMS for React Website Builder",
"main": "package.json",
"author": "theHandsomestNerd <hello@thehandsomestnerd.com>",
Expand Down
13 changes: 3 additions & 10 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ import SnackbarProvider from "./components/modal-context/SnackbarProvider";
import PageMux from "./components/templates/mackenzies-mind/pages/PageMux";
import CustomizedThemeProvider from "./components/customized-theme-provider/CustomizedThemeProvider";

export enum RoutesEnum {
MAINROUTE = "/chow-works/:pageSlug",
HOMEROUTE = "/chow-works/home",

ERROR = '/error'
}

function App() {
const queryClient = new QueryClient({
defaultOptions: {
Expand Down Expand Up @@ -49,11 +42,11 @@ function App() {

<Grid item>
<Routes>
<Route path={RoutesEnum.MAINROUTE} element={<PageMux/>}/>
<Route path={RoutesEnum.ERROR} element={<FourOhFour/>}/>
<Route path={"/"+process.env.REACT_APP_BASE_ROUTE +"/:pageSlug"} element={<PageMux/>}/>
<Route path={'/error'} element={<FourOhFour/>}/>
<Route path={"/*"}
element={<Navigate
to={RoutesEnum.HOMEROUTE}/>}/>
to={"/"+process.env.REACT_APP_BASE_ROUTE+"/home"}/>}/>
</Routes>
</Grid>
</Grid>
Expand Down
6 changes: 3 additions & 3 deletions src/sanityClient.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import sanityClient from "@sanity/client";

// console.log("NODE.ENV", process.env)
console.log("NODE.ENV", process.env)

export default sanityClient({
projectId: "e5l5k4i5",
projectId: process.env.REACT_APP_SANITY_PROJECTID,
dataset: process.env.REACT_APP_SANITY_DB,
apiVersion: "2021-03-25",
apiVersion: process.env.REACT_APP_SANITY_APIVERSION,
useCdn: true,
});

0 comments on commit 88546bc

Please sign in to comment.