Skip to content

Commit

Permalink
これでどうだ!!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
totegamma committed Feb 3, 2024
1 parent 02009e5 commit ca4f477
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/Timeline/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, Divider, ListItem, ListItemIcon, ListItemText, Typography, useTheme } from '@mui/material'
import React, { memo, useCallback, useEffect, useState, useRef, forwardRef, type ForwardedRef } from 'react'
import { Box, Divider, ListItem, ListItemIcon, ListItemText, type SxProps, Typography, useTheme } from '@mui/material'
import React, { memo, useCallback, useEffect, useState, useRef, forwardRef, type ForwardedRef, useMemo } from 'react'
import { AssociationFrame } from '../Association/AssociationFrame'
import { useApi } from '../../context/api'
import { Loading } from '../ui/Loading'
Expand Down Expand Up @@ -155,6 +155,12 @@ const timeline = forwardRef((props: TimelineProps, ref: ForwardedRef<VListHandle
})
}

const timelineElemSx: SxProps = useMemo(() => {
return {
p: 0
}
}, [])

return (
<>
<Box
Expand Down Expand Up @@ -263,7 +269,7 @@ const timeline = forwardRef((props: TimelineProps, ref: ForwardedRef<VListHandle
case 'message':
element = (
<MessageContainer
sx={{ p: 0.5 }}
sx={timelineElemSx}
messageID={e.objectID}
messageOwner={e.owner}
lastUpdated={e.lastUpdate?.getTime() ?? 0}
Expand Down

0 comments on commit ca4f477

Please sign in to comment.