fixed backend ip
This commit is contained in:
@@ -32,7 +32,7 @@ function formatSlug(slug: string) {
|
||||
<Layout title="Home">
|
||||
<div class="space-y-8">
|
||||
<section class="text-center py-12">
|
||||
<h1 class="text-5xl font-extrabold mb-4 bg-clip-text text-transparent bg-gradient-to-r from-mauve via-blue to-teal">
|
||||
<h1 class="text-5xl font-extrabold mb-4 pb-4 leading-tight bg-clip-text text-transparent bg-gradient-to-r from-mauve via-blue to-teal">
|
||||
Welcome to my blog
|
||||
</h1>
|
||||
<p class="text-subtext1 text-lg max-w-2xl mx-auto">
|
||||
@@ -75,3 +75,9 @@ function formatSlug(slug: string) {
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
>
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
|
||||
@@ -3,7 +3,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||
import { marked } from 'marked';
|
||||
|
||||
const { slug } = Astro.params;
|
||||
const API_URL = import.meta.env.PUBLIC_API_URL || 'http://localhost:3000';
|
||||
const API_URL = (typeof process !== 'undefined' ? process.env.PUBLIC_API_URL : import.meta.env.PUBLIC_API_URL) || 'http://localhost:3000';
|
||||
|
||||
interface PostDetail {
|
||||
slug: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
const { path } = Astro.params;
|
||||
const API_URL = import.meta.env.PUBLIC_API_URL || 'http://localhost:3000';
|
||||
const API_URL = (typeof process !== 'undefined' ? process.env.PUBLIC_API_URL : import.meta.env.PUBLIC_API_URL) || 'http://localhost:3000';
|
||||
|
||||
const response = await fetch(`${API_URL}/uploads/${path}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user