From eae627807b3df85b840828868ec0d615fc7ea072 Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Wed, 30 Mar 2022 23:30:01 -0700 Subject: [PATCH] client: expiration styling improvements --- .../badges/expiration-badge/index.tsx | 18 +++++++++--------- client/components/post-page/index.tsx | 5 ++--- client/pages/expired.tsx | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/client/components/badges/expiration-badge/index.tsx b/client/components/badges/expiration-badge/index.tsx index 09f620a8..62655ae8 100644 --- a/client/components/badges/expiration-badge/index.tsx +++ b/client/components/badges/expiration-badge/index.tsx @@ -4,7 +4,7 @@ import { useCallback, useEffect, useMemo, useState } from "react"; const ExpirationBadge = ({ postExpirationDate, - onExpires + // onExpires }: { postExpirationDate: Date | string | null onExpires?: () => void @@ -33,14 +33,14 @@ const ExpirationBadge = ({ return timeUntilString && timeUntilString === "in 0 seconds" }, [timeUntilString]) - useEffect(() => { - // check if expired every - if (isExpired) { - if (onExpires) { - onExpires(); - } - } - }, [isExpired, onExpires]) + // useEffect(() => { + // // check if expired every + // if (isExpired) { + // if (onExpires) { + // onExpires(); + // } + // } + // }, [isExpired, onExpires]) if (!expirationDate) { return null; diff --git a/client/components/post-page/index.tsx b/client/components/post-page/index.tsx index 087c2d85..ef6d3d5c 100644 --- a/client/components/post-page/index.tsx +++ b/client/components/post-page/index.tsx @@ -94,12 +94,11 @@ const PostPage = ({ post }: Props) => { }}> - + - {/* If it hasn't expired, the badge can be too long */} - + diff --git a/client/pages/expired.tsx b/client/pages/expired.tsx index a1adcff5..aecb1fff 100644 --- a/client/pages/expired.tsx +++ b/client/pages/expired.tsx @@ -8,7 +8,7 @@ const Expired = () => {
- Error: The drift you're trying to view has expired. + Error: The Drift you're trying to view has expired.