Skip to content

Commit 67841c9

Browse files
committed
event schedule formatting
1 parent 353e704 commit 67841c9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

client/src/components/classes/ClassesLayout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export default function ClassesLayout() {
7272
</ClassesErrorBurrito>
7373
)
7474

75+
/*
7576
const updateSgy = async () => {
7677
// If it's been less than 5 seconds since the last attempted fetch
7778
if (lastFetched && Date.now() - lastFetched < 6 * 1000)
@@ -243,6 +244,7 @@ export default function ClassesLayout() {
243244
</div>
244245
</SgyDataProvider>
245246
)
247+
*/
246248
}
247249

248250
function ClassesNavBarItem(props: {text: string, to: string}) {

client/src/components/schedule/Event.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ export default function Event(props: GCalEvent) {
5353
</Disclosure.Button>
5454
<Disclosure.Panel className="flex flex-col gap-2 text-secondary text-sm mt-2 px-2 whitespace-pre-wrap">
5555
{/* Parse away trailing whitespace, split excessive newlines into paragraph spacing */}
56-
{description.trim().split(/(?:\n\s*)+/).map(l => <p key={l}>{l}</p>)}
56+
{description
57+
.trim()
58+
.split(/(?:\n\s*)+/)
59+
.map(l => <p key={l}>{l.replace(/(\)|])([^\s:])/g, '$1\n$2')}</p>)}
5760
</Disclosure.Panel>
5861
</>)}
5962
</Disclosure>

0 commit comments

Comments
 (0)