Skip to content

Commit f81776d

Browse files
committed
Add live param
1 parent 9ecc3fd commit f81776d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/components/Avatar/Avatar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import VerificationCheck from '../VerificationCheck/VerificationCheck';
1010
import styles from './Avatar.module.scss';
1111
import { useAppContext } from '../../contexts/AppContext';
1212
import { LegendCustomizationConfig } from '../../lib/premium';
13+
import { useSearchParams } from '@solidjs/router';
1314

1415
const Avatar: Component<{
1516
src?: string | undefined,
@@ -25,6 +26,7 @@ const Avatar: Component<{
2526

2627
const media = useMediaContext();
2728
const app = useAppContext();
29+
const [searchParams, setSearchParams] = useSearchParams();
2830

2931
const [isCached, setIsCached] = createSignal(false);
3032

@@ -243,7 +245,7 @@ const Avatar: Component<{
243245
</div>
244246
</Show>
245247

246-
<Show when={media?.actions.isStreaming(props.user?.pubkey || 'n/a')}>
248+
<Show when={searchParams.live === '1' && media?.actions.isStreaming(props.user?.pubkey || 'n/a')}>
247249
<div class={styles.centerBottom}>
248250
<a
249251
id={props.id}

src/components/HomeSidebar/HomeSidebar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { userName } from '../../stores/profile';
2727
import { date } from '../../lib/dates';
2828
import { useAppContext } from '../../contexts/AppContext';
2929
import LiveEventSidebarSkeleton from '../Skeleton/LiveEventSidebarSkeleton';
30+
import { useSearchParams } from '@solidjs/router';
3031

3132
const sidebarOptions = [
3233
{
@@ -140,6 +141,7 @@ const HomeSidebar: Component< { id?: string } > = (props) => {
140141
const account = useAccountContext();
141142
const home = useHomeContext();
142143
const app = useAppContext();
144+
const [searchParams, setSearchParams] = useSearchParams();
143145

144146
const subId = `live_events_sidebar_${APP_ID}`;
145147

@@ -243,7 +245,7 @@ const HomeSidebar: Component< { id?: string } > = (props) => {
243245

244246
return (
245247
<div id={props.id}>
246-
<Show when={liveEvents.length > 0}>
248+
<Show when={searchParams.live === '1' && liveEvents.length > 0}>
247249
<div class={styles.headingLive}>
248250
<div>
249251
Live on Nostr

0 commit comments

Comments
 (0)