Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache bust take 2 #941

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions app/launch-week/ProductHunt.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
"use client";
import { useMemo } from "react";

const url =
"https://www.producthunt.com/posts/workflow-kit-by-inngest?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-workflow-kit-by-inngest";

export default function ProductHunt() {
// We do this b/c this is a descendent of a card which is a link. This is a hack and I'm not proud of it.
// cache bust every 60s
const ts = useMemo(() => Math.floor(Date.now() / 1000 / 60), []);
return (
<div
className="cursor-pointer"
Expand All @@ -17,7 +14,7 @@ export default function ProductHunt() {
}}
>
<img
src={`https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=490802&theme=dark&ts=${ts}`}
src={`https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=490802&theme=dark`}
alt="Workflow&#0032;Kit&#0032;by&#0032;Inngest - Open&#0032;source&#0032;SDK&#0032;to&#0032;add&#0032;Zapier&#0045;like&#0032;workflows&#0032;to&#0032;your&#0032;product | Product Hunt"
style={{ width: "250px", height: "54px" }}
width="250"
Expand Down
7 changes: 2 additions & 5 deletions components/ProductHuntAnnouncementBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
"use client";
import React, { useMemo } from "react";
import React from "react";

const ProductHuntAnnouncementBanner = () => {
// cache bust every 60s
const ts = useMemo(() => Math.floor(Date.now() / 1000 / 60), []);
return (
<div className="py-4 px-4 flex flex-col md:flex-row items-center justify-center border-b border-[#B0B0B0] gap-8 relative">
<div className="text-sm text-basis max-w-[826px]">
Expand Down Expand Up @@ -43,7 +40,7 @@ const ProductHuntAnnouncementBanner = () => {
>
<img
className="border border-white rounded-lg"
src={`https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=490802&theme=dark&ts=${ts}`}
src={`https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=490802&theme=dark`}
alt="Workflow&#0032;Kit&#0032;by&#0032;Inngest - Open&#0032;source&#0032;SDK&#0032;to&#0032;add&#0032;Zapier&#0045;like&#0032;workflows&#0032;to&#0032;your&#0032;product | Product Hunt"
style={{ width: "169px", height: "38px" }}
width="169"
Expand Down
Loading