Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Made API URL variable

Mish Ushakov5ec66829d104
diff --git a/apps/web/src/components/Dashboard/Templates.tsx b/apps/web/src/components/Dashboard/Templates.tsx
index 7a7d75106..21c737aab 100644
--- a/apps/web/src/components/Dashboard/Templates.tsx
+++ b/apps/web/src/components/Dashboard/Templates.tsx
@@ -68,7 +68,7 @@ export function TemplatesContent({
useEffect(() => {
async function fetchTemplates() {
const res = await fetch(
- `http://localhost:3000/templates?teamID=${teamId}`,
+ `${process.env.NEXT_PUBLIC_API_URL}/templates?teamID=${teamId}`,
{
method: 'GET',
headers: {
@@ -99,7 +99,7 @@ export function TemplatesContent({
async function deleteTemplate() {
const res = await fetch(
- `http://localhost:3000/templates/${currentTemplate?.templateID}`,
+ `${process.env.NEXT_PUBLIC_API_URL}/templates/${currentTemplate?.templateID}`,
{
method: 'DELETE',
headers: {
@@ -126,7 +126,7 @@ export function TemplatesContent({
async function publishTemplate() {
const res = await fetch(
- `http://localhost:3000/templates/${currentTemplate?.templateID}`,
+ `${process.env.NEXT_PUBLIC_API_URL}/templates/${currentTemplate?.templateID}`,
{
method: 'PATCH',
headers: {