From 7d51f0be543b37da1faa088bbbcde0810be53488 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9rgio=20Rafael=20Siqueira?=
Date: Fri, 25 Apr 2025 17:12:35 -0300
Subject: [PATCH] add site
---
superpage/src/pages/_components/Search.jsx | 2 +-
superpage/src/pages/blog/[slug].astro | 29 ----------------------
superpage/src/pages/blog/index.astro | 24 ------------------
superpage/src/pages/index.astro | 24 ------------------
4 files changed, 1 insertion(+), 78 deletions(-)
delete mode 100644 superpage/src/pages/blog/[slug].astro
delete mode 100644 superpage/src/pages/blog/index.astro
diff --git a/superpage/src/pages/_components/Search.jsx b/superpage/src/pages/_components/Search.jsx
index ee78588..66917cb 100644
--- a/superpage/src/pages/_components/Search.jsx
+++ b/superpage/src/pages/_components/Search.jsx
@@ -41,7 +41,7 @@ export default function Search({ searchlist }) {
{query}'
- {items.length > 1 && (
+ {items.length > 0 && (
{items.map(({ data }, idx) => (
-
diff --git a/superpage/src/pages/blog/[slug].astro b/superpage/src/pages/blog/[slug].astro
deleted file mode 100644
index 5d82b4e..0000000
--- a/superpage/src/pages/blog/[slug].astro
+++ /dev/null
@@ -1,29 +0,0 @@
----
-import Layout from '~/layouts/Layout.astro'
-import Container from '~/components/Container.astro'
-
-export async function getStaticPaths() {
- const data = await fetch('https://betaeducacao.com.br/wp-json/wp/v2/posts')
- const posts = await data.json()
-
- return posts.map((post) => ({
- params: { slug: post.slug },
- props: { post },
- }))
-}
-
-const { post } = Astro.props
----
-
-
- {post.title.rendered}
-
-
-
-
-
-
-
-
-
-
diff --git a/superpage/src/pages/blog/index.astro b/superpage/src/pages/blog/index.astro
deleted file mode 100644
index 53b3877..0000000
--- a/superpage/src/pages/blog/index.astro
+++ /dev/null
@@ -1,24 +0,0 @@
----
-import Layout from "~/layouts/Layout.astro";
-import Container from "~/components/Container.astro";
-
-let res = await fetch("https://betaeducacao.com.br/wp-json/wp/v2/posts");
-let posts = await res.json();
----
-
-
-
- {
- posts.map((post) => (
-
-
-
-
-
- ))
- }
-
-
diff --git a/superpage/src/pages/index.astro b/superpage/src/pages/index.astro
index b08f986..bc1736d 100644
--- a/superpage/src/pages/index.astro
+++ b/superpage/src/pages/index.astro
@@ -7,9 +7,6 @@ import { Clients } from "~/components/Course";
import Search from "./_components/Search.astro";
import mulhercomepi from "~/assets/mulher-com-epi.png";
-
-let res = await fetch("https://betaeducacao.com.br/wp-json/wp/v2/posts");
-let posts = await res.json();
---
@@ -68,26 +65,5 @@ let posts = await res.json();
-
-
-
-
- Ăšltimos posts
-
-
- {
- posts.map((post) => (
-
-
-
-
-
- ))
- }
-
-