diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/eslint.config.js b/eslint.config.js index db23c74..429b212 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -16,7 +16,7 @@ export default defineConfig([ reactRefresh.configs.vite, ], languageOptions: { - ecmaVersion: 2024, + ecmaVersion: 2025, globals: globals.browser, }, }, diff --git a/index.html b/index.html index da80501..c6f2361 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,18 @@ Pumpkin Market + +
diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index a7ba195..17b8bcf 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -3,7 +3,7 @@ import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import api from '../api'; -const API_URL = 'http://localhost:5000'; +const ASSETS_URL = import.meta.env.VITE_ASSETS_BASE_URL || 'https://assets.pumpkinmc.org/icons'; const Home = () => { const { t, i18n } = useTranslation(); @@ -243,17 +243,24 @@ const Home = () => { const priceInfo = getEffectivePrice(plugin); const isSale = plugin.type === 'paid' && priceInfo.isSale; + const imageUrl = plugin.preview_path; + console.log(imageUrl); + return (
{/* Preview image */}
- {plugin.preview_path ? ( + {imageUrl ? ( {plugin.name} { + // Fallback if image 404s + (e.target as HTMLImageElement).style.display = 'none'; + }} /> ) : (