From b49f1cdc301553ba3f553a8defe286bfff458fd1 Mon Sep 17 00:00:00 2001 From: James Culveyhouse Date: Wed, 11 Jan 2023 14:35:26 -0600 Subject: [PATCH 1/2] Hiding tags and news pages --- .../src/routes/(frontend)/explore/layout.tsx | 64 ++++++++++--------- .../links/{index.tsx => index.hidden.tsx} | 0 .../tags/{index.tsx => index.hidden.tsx} | 0 3 files changed, 33 insertions(+), 31 deletions(-) rename frontend/src/routes/(frontend)/explore/links/{index.tsx => index.hidden.tsx} (100%) rename frontend/src/routes/(frontend)/explore/tags/{index.tsx => index.hidden.tsx} (100%) diff --git a/frontend/src/routes/(frontend)/explore/layout.tsx b/frontend/src/routes/(frontend)/explore/layout.tsx index 007a20e..dc6f0b4 100644 --- a/frontend/src/routes/(frontend)/explore/layout.tsx +++ b/frontend/src/routes/(frontend)/explore/layout.tsx @@ -1,41 +1,43 @@ import { component$, Slot } from '@builder.io/qwik' -import { Link, useLocation } from '@builder.io/qwik-city' +// import { Link, useLocation } from '@builder.io/qwik-city' import StickyHeader from '~/components/StickyHeader/StickyHeader' -type LinkConfig = { - linkText: string - linkTarget: string -} +// type LinkConfig = { +// linkText: string +// linkTarget: string +// } export default component$(() => { - const location = useLocation() + /*********** Hiding these features (news & hashtag links) until the backend support is available ******************/ - const renderNavLink = ({ linkText, linkTarget }: LinkConfig) => { - const isActive = location.pathname.replace(/\/$/, '') === linkTarget + // const location = useLocation() - return ( -
- - {linkText} - -
- ) - } + // const renderNavLink = ({ linkText, linkTarget }: LinkConfig) => { + // const isActive = location.pathname.replace(/\/$/, '') === linkTarget - const links = [ - { - linkText: 'Posts', - linkTarget: '/explore', - }, - { - linkText: 'Hashtags', - linkTarget: '/explore/tags', - }, - { - linkText: 'News', - linkTarget: '/explore/links', - }, - ] + // return ( + //
+ // + // {linkText} + // + //
+ // ) + // } + + // const links = [ + // { + // linkText: 'Posts', + // linkTarget: '/explore', + // }, + // { + // linkText: 'Hashtags', + // linkTarget: '/explore/tags', + // }, + // { + // linkText: 'News', + // linkTarget: '/explore/links', + // }, + // ] return (
@@ -45,7 +47,7 @@ export default component$(() => { Explore -
{links.map((link) => renderNavLink(link))}
+ {/*
{links.map((link) => renderNavLink(link))}
*/}
diff --git a/frontend/src/routes/(frontend)/explore/links/index.tsx b/frontend/src/routes/(frontend)/explore/links/index.hidden.tsx similarity index 100% rename from frontend/src/routes/(frontend)/explore/links/index.tsx rename to frontend/src/routes/(frontend)/explore/links/index.hidden.tsx diff --git a/frontend/src/routes/(frontend)/explore/tags/index.tsx b/frontend/src/routes/(frontend)/explore/tags/index.hidden.tsx similarity index 100% rename from frontend/src/routes/(frontend)/explore/tags/index.tsx rename to frontend/src/routes/(frontend)/explore/tags/index.hidden.tsx From 97ab1ab5e1489321242d2fb7129b33d0703db0e1 Mon Sep 17 00:00:00 2001 From: James Culveyhouse Date: Wed, 11 Jan 2023 14:38:35 -0600 Subject: [PATCH 2/2] Fix globe icon alignment issue --- frontend/src/components/Status/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Status/index.tsx b/frontend/src/components/Status/index.tsx index 65daf0e..cd6e8b4 100644 --- a/frontend/src/components/Status/index.tsx +++ b/frontend/src/components/Status/index.tsx @@ -36,7 +36,7 @@ export default component$((props: Props) => {
-
+
{formatTimeAgo(new Date(status.created_at))}