diff --git a/src/components/SponsorList.tsx b/src/components/SponsorList.tsx index 4f0f6702..a0bc5751 100644 --- a/src/components/SponsorList.tsx +++ b/src/components/SponsorList.tsx @@ -10,7 +10,16 @@ export const SponsorList = () => { description: "Does your interface have a backend yet? Try n8n", }, + + { + imgSrc: "/sponsors/logos/warp.png", + url: "https://warp.dev/open-webui", + name: "Warp", + description: + "The intelligent terminal for developers", + }, ]; + const sponsors = [ { imgSrc: "/sponsors/sponsor.png", @@ -62,8 +71,8 @@ export const SponsorList = () => {
- {emeraldSponsors.map((sponsor) => ( - + {emeraldSponsors.map((sponsor, sponsorIdx) => ( + ))}
@@ -76,8 +85,8 @@ export const SponsorList = () => {
- {sponsors.map((sponsor) => ( - + {sponsors.map((sponsor, sponsorIdx) => ( + ))}
diff --git a/src/components/Sponsors/TopBanner.tsx b/src/components/Sponsors/TopBanner.tsx index 5f84bd19..710c83c6 100644 --- a/src/components/Sponsors/TopBanner.tsx +++ b/src/components/Sponsors/TopBanner.tsx @@ -1,35 +1,31 @@ -export const TopBanner = ({ items }) => { +export const TopBanner = ({ item }) => { return (
- {items.map((item) => ( - <> -
-
- Sponsored by {item.name} -
+
+
+ Sponsored by {item.name} +
- - {item.name} + + {item.name} - {item.name} - + {item.name} + -
- {item.description} -
-
- - ))} +
+ {item.description} +
+
); }; diff --git a/src/components/TopBanners.tsx b/src/components/TopBanners.tsx index 4b58f4f5..11bee0e1 100644 --- a/src/components/TopBanners.tsx +++ b/src/components/TopBanners.tsx @@ -1,4 +1,5 @@ import { TopBanner } from "@site/src/components/Sponsors/TopBanner"; +import { useEffect, useState } from "react"; export const TopBanners = () => { const items = [ @@ -20,17 +21,24 @@ export const TopBanners = () => { "Does your interface have a backend yet? Try n8n", }, - { - imgSrc: "/sponsors/banners/n8n-banner.png", - mobileImgSrc: "/sponsors/banners/n8n-banner-mobile.png", - url: "https://n8n.io/", - name: "n8n", + imgSrc: "/sponsors/banners/warp-banner.png", + mobileImgSrc: "/sponsors/banners/warp-banner-mobile.png", + url: "https://warp.dev/open-webui", + name: "Warp", description: - "Does your interface have a backend yet? Try n8n", + "The intelligent terminal for developers", + }, + + { + imgSrc: "/sponsors/banners/warp-banner.png", + mobileImgSrc: "/sponsors/banners/warp-banner-mobile.png", + url: "https://warp.dev/open-webui", + name: "Warp", + description: + "The intelligent terminal for developers", }, - { imgSrc: "/sponsors/banners/placeholder.png", mobileImgSrc: "/sponsors/banners/placeholder-mobile.png", @@ -42,7 +50,15 @@ export const TopBanners = () => { ]; // Randomly select an item to display - let selectedItemIdx = Math.floor(Math.random() * items.length); + const [selectedItemIdx, setSelectedItemIdx] = useState(Math.floor(Math.random() * items.length)); - return ; + useEffect(() => { + // After mounting update every 5 seconds + setInterval(() => { + setSelectedItemIdx(Math.floor(Math.random() * items.length)); + }, 10000); // 10000 ms = 10 seconds + }, []); + + + return ; }; diff --git a/static/sponsors/banners/warp-banner-mobile.png b/static/sponsors/banners/warp-banner-mobile.png new file mode 100644 index 00000000..7b877595 Binary files /dev/null and b/static/sponsors/banners/warp-banner-mobile.png differ diff --git a/static/sponsors/banners/warp-banner.png b/static/sponsors/banners/warp-banner.png new file mode 100644 index 00000000..3807f347 Binary files /dev/null and b/static/sponsors/banners/warp-banner.png differ diff --git a/static/sponsors/logos/warp.png b/static/sponsors/logos/warp.png new file mode 100644 index 00000000..51b927c9 Binary files /dev/null and b/static/sponsors/logos/warp.png differ