Skip to content

Commit

Permalink
merge dev
Browse files Browse the repository at this point in the history
  • Loading branch information
greatsamist committed Feb 28, 2024
2 parents 5c5d95f + 51ecd0d commit 5058afe
Show file tree
Hide file tree
Showing 7 changed files with 22,472 additions and 16,452 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ import {
isSameDate,
} from '@/lib/utils/time'
import Markdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import { Suspense } from 'react'
import banner from '@/public/streameth_twitter_banner.jpeg'
import { IExtendedEvent } from '@/lib/types'
import SignUp from '@/components/plugins/SignUp'
import MDEditor from '@uiw/react-md-editor'
import MarkdownDisplay from '@/components/misc/MarkdownDisplay'
export default function EventHomeComponent({
event,
stages,
Expand Down Expand Up @@ -109,9 +110,7 @@ export default function EventHomeComponent({
</div>
</CardHeader>
<CardContent className="pt-0 lg:pt-0 text-white">
<Markdown remarkPlugins={[remarkGfm]}>
{event.description}
</Markdown>
<MarkdownDisplay content={event.description} />
</CardContent>
<CardFooter className="flex flex-col p-4 space-y-2 w-full items-start">
<CardTitle className=" text-white">Livestreams</CardTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { notFound } from 'next/navigation'
import { generalMetadata, stageMetadata } from '@/lib/utils/metadata'
import { Metadata } from 'next'
import { fetchChat } from '@/lib/services/chatService'

import { Livepeer } from 'livepeer'
import { buildPlaybackUrl } from '@/lib/utils/utils'
export default async function Stage({ params }: EventPageProps) {
Expand Down Expand Up @@ -48,10 +47,9 @@ export default async function Stage({ params }: EventPageProps) {
return s.start < Date.now() && s.end > Date.now()
})

console.log('currentSession', currentSession)
return (
<div className="bg-event flex flex-col w-full md:flex-row relative lg:max-h-[calc(100vh-54px)] p-2 gap-2">
<div className="flex flex-col w-full md:h-full z-40 md:w-full top-[54px] gap-2">
<div className="flex flex-col w-full md:h-full md:overflow-auto z-40 md:w-full top-[54px] gap-2">
<Player
src={[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import DatePicker from '@/components/misc/form/datePicker'
import { generateTimezones } from '@/lib/utils/time'
import { toast } from 'sonner'
import { useCallback, useState } from 'react'
import MDEditor from '@uiw/react-md-editor'

import {
syncEventImportAction,
updateEventAction,
Expand Down Expand Up @@ -147,9 +149,9 @@ const EventAccordion = ({ event }: { event: IExtendedEvent }) => {
<FormItem>
<FormLabel className="">Description</FormLabel>
<FormControl>
<Textarea
placeholder="a description"
{...field}
<MDEditor
value={field.value}
onChange={(a) => field.onChange(a)}
/>
</FormControl>
<FormMessage />
Expand Down
13 changes: 13 additions & 0 deletions packages/app/components/misc/MarkdownDisplay.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use client'
import MDEditor from '@uiw/react-md-editor'

const MarkdownDisplay = ({ content }: { content: string }) => {
return (
<MDEditor.Markdown
source={content}
style={{ whiteSpace: 'pre-wrap', background: 'transparent' }}
/>
)
}

export default MarkdownDisplay
3 changes: 2 additions & 1 deletion packages/app/components/sessions/InfoBoxDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { CardContent } from '@/components/ui/card'
import { ArrowDownWideNarrow, ArrowUpWideNarrow } from 'lucide-react'
import SpeakerIcon from '../speakers/speakerIcon'
import { IExtendedSpeaker } from '@/lib/types'
import MarkdownDisplay from '../misc/MarkdownDisplay'

const InfoBoxDescription = ({
description,
Expand Down Expand Up @@ -40,7 +41,7 @@ const InfoBoxDescription = ({
className={`transition-max-height duration-700 ease-in-out overflow-hidden ${
isExpandable && !isOpened && 'max-h-10'
}`}>
{description}
{description && <MarkdownDisplay content={description} />}
<div className="flex flex-row mt-2 space-x-2 overflow-auto">
{speakers &&
speakers.map((speaker) => (
Expand Down
1 change: 1 addition & 0 deletions packages/app/components/sessions/SessionInfoBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from '@/components/ui/card'
import InfoBoxDescription from './InfoBoxDescription'
import { IExtendedSpeaker } from '@/lib/types'
import Markdown from 'react-markdown'
// TODO LOADING STAT
const SessionInfoBox = ({
title,
Expand Down
Loading

0 comments on commit 5058afe

Please sign in to comment.