fix: tags alignment
This commit is contained in:
@ -1,13 +1,21 @@
|
|||||||
|
import type { ReactNode } from "react";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { TaggedRawEvent } from "@snort/system";
|
import { TaggedRawEvent } from "@snort/system";
|
||||||
import { StreamState } from "index";
|
import { StreamState } from "index";
|
||||||
import { findTag } from "utils";
|
import { findTag } from "utils";
|
||||||
|
|
||||||
export function Tags({ ev }: { ev: TaggedRawEvent }) {
|
export function Tags({
|
||||||
|
children,
|
||||||
|
ev,
|
||||||
|
}: {
|
||||||
|
children?: ReactNode;
|
||||||
|
ev: TaggedRawEvent;
|
||||||
|
}) {
|
||||||
const status = findTag(ev, "status");
|
const status = findTag(ev, "status");
|
||||||
const start = findTag(ev, "starts");
|
const start = findTag(ev, "starts");
|
||||||
return (
|
return (
|
||||||
<div className="tags">
|
<div className="tags">
|
||||||
|
{children}
|
||||||
{status === StreamState.Planned && (
|
{status === StreamState.Planned && (
|
||||||
<span className="pill">
|
<span className="pill">
|
||||||
{status === StreamState.Planned ? "Starts " : ""}
|
{status === StreamState.Planned ? "Starts " : ""}
|
||||||
|
@ -46,8 +46,11 @@ function ProfileInfo({ link }: { link: NostrLink }) {
|
|||||||
<div className="f-grow stream-info">
|
<div className="f-grow stream-info">
|
||||||
<h1>{findTag(thisEvent.data, "title")}</h1>
|
<h1>{findTag(thisEvent.data, "title")}</h1>
|
||||||
<p>{findTag(thisEvent.data, "summary")}</p>
|
<p>{findTag(thisEvent.data, "summary")}</p>
|
||||||
|
{thisEvent?.data && (
|
||||||
|
<Tags ev={thisEvent.data}>
|
||||||
<StatePill state={status as StreamState} />
|
<StatePill state={status as StreamState} />
|
||||||
{thisEvent?.data && <Tags ev={thisEvent.data} />}
|
</Tags>
|
||||||
|
)}
|
||||||
{isMine && (
|
{isMine && (
|
||||||
<div className="actions">
|
<div className="actions">
|
||||||
{thisEvent.data && (
|
{thisEvent.data && (
|
||||||
|
Reference in New Issue
Block a user