Skip to content

Commit

Permalink
mke date themable
Browse files Browse the repository at this point in the history
  • Loading branch information
amcdnl committed Jul 26, 2024
1 parent 9ca827d commit e1d56ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SessionMessages/SessionMessages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const SessionMessages: React.FC<SessionMessagesProps> = ({
<div className={cn(theme.messages.base)}>
<header className={cn(theme.messages.header)}>
<h2 className={cn(theme.messages.title)}>{activeSession.title}</h2>
<DateFormat date={activeSession.createdAt} />
<DateFormat className={cn(theme.messages.date)} date={activeSession.createdAt} />
</header>
<div className={cn(theme.messages.content)} ref={contentRef}>
{hasMore && (
Expand Down
1 change: 0 additions & 1 deletion src/SessionsList/SessionGroups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { FC, ReactNode, useContext, useMemo } from 'react';
import { GroupedSessions, groupSessionsByDate } from '@/utils';
import { SessionsContext } from '@/SessionsContext';


export interface SessionGroupsProps {
children: (groups: GroupedSessions[]) => ReactNode;
}
Expand Down
2 changes: 2 additions & 0 deletions src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface ChatTheme {
messages: {
base: string;
title: string;
date: string;
content: string;
header: string;
showMore: string;
Expand Down Expand Up @@ -53,6 +54,7 @@ export const chatTheme: ChatTheme = {
messages: {
base: 'flex flex-col flex-1 overflow-hidden',
title: 'text-2xl font-bold',
date: 'text-sm',
content: 'mt-2 flex-1 overflow-auto',
header: 'flex justify-between items-center',
showMore: 'mb-4',
Expand Down

0 comments on commit e1d56ae

Please sign in to comment.