Skip to content

Commit

Permalink
Change .env variable names
Browse files Browse the repository at this point in the history
kintsoogi committed Dec 13, 2023
1 parent 9760e7e commit 3ffcbff
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/common/sendFeedback.js
Original file line number Diff line number Diff line change
@@ -17,14 +17,14 @@ export default async function sendFeedback({ name, email, message, category, ext
}

const msg = {
to: import.meta.env.HELP_DESK_EMAIL,
to: import.meta.env.VITE_HELP_DESK_EMAIL,
from: email,
subject: `gatewayEdit App: ${category}`,
text: fullMessage,
html: fullMessage.replace(/\n/g, '<br>'),
}

sgMail.setApiKey(import.meta.env.HELP_DESK_TOKEN)
sgMail.setApiKey(import.meta.env.VITE_HELP_DESK_TOKEN)

return sgMail.send(msg)
}
2 changes: 1 addition & 1 deletion src/components/Layout.jsx
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ export default function Layout({
let server_ = (serverID_ === QA) ? QA_BASE_URL : BASE_URL

if (params.get('server')?.length === 0){
server_ = (import.meta.env.NEXT_PUBLIC_BUILD_CONTEXT === 'production') ? BASE_URL : QA_BASE_URL
server_ = (import.meta.env.VITE_NEXT_PUBLIC_BUILD_CONTEXT === 'production') ? BASE_URL : QA_BASE_URL
serverID_ = (server_ === QA_BASE_URL) ? QA : PROD
}

2 changes: 1 addition & 1 deletion src/context/AuthContext.jsx
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ export const AuthContext = createContext({})
export default function AuthContextProvider(props) {
const [authentication, setAuthentication] = useState(null)
const [networkError, setNetworkError] = useState(null)
const defaultServer = (import.meta.env.NEXT_PUBLIC_BUILD_CONTEXT === 'production') ? BASE_URL : QA_BASE_URL
const defaultServer = (import.meta.env.VITE_NEXT_PUBLIC_BUILD_CONTEXT === 'production') ? BASE_URL : QA_BASE_URL
const [server, setServer] = useLocalStorage(SERVER_KEY, defaultServer)

/**
2 changes: 1 addition & 1 deletion src/utils/build.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ export function getCommitHash() {
let commitHash

try {
commitHash = import.meta.env.NEXT_PUBLIC_BUILD_NUMBER
commitHash = import.meta.env.VITE_NEXT_PUBLIC_BUILD_NUMBER
} catch (e) {
console.error(`getCommitHash() - could not get commit hash`, e)
}

0 comments on commit 3ffcbff

Please sign in to comment.