Skip to content

Commit

Permalink
SITES-22068: Session list is not showing up in QA (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
irenelagno authored May 20, 2024
1 parent 4a96a73 commit 3ea4ce6
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions web-src/src/components/MainSidePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* governing permissions and limitations under the License.
*/
import {
Flex, Grid, Image, Link, Text, ActionButton, TooltipTrigger, Tooltip, Heading, Item,
Flex, Grid, Image, Link, Text, ActionButton, TooltipTrigger, Tooltip, Heading,
} from '@adobe/react-spectrum';
import React, { useCallback } from 'react';
import ShowMenu from '@spectrum-icons/workflow/ShowMenu';
Expand Down Expand Up @@ -205,14 +205,20 @@ export function MainSidePanel(props) {
&& sessions.toReversed().map((session) => {
const sessionDate = new Date(session.name);
const groupingLabel = groupingLabelGenerator(sessionDate);

return (<Item key={sessionDate}>
{groupingLabel && <Text UNSAFE_className={style.subMenuHeader}>{groupingLabel}</Text>}
{/* eslint-disable-next-line max-len */}
<li className={currentSession && viewType === ViewType.CurrentSession && session && session.id === currentSession.id ? derivedStyles.clickedSubMenuItem : style.subMenuItem} key={session.id}>
<Link href="#" UNSAFE_className={style.menuItemLink} onPress={() => handleRecent(session)}>{session.name}</Link>
</li>
</Item>);
return (
<>
{groupingLabel
&& <Text key={groupingLabel} UNSAFE_className={style.subMenuHeader}>
{groupingLabel}
</Text>}
{/* eslint-disable-next-line max-len */}
<li className={currentSession && viewType === ViewType.CurrentSession && session && session.id === currentSession.id ? derivedStyles.clickedSubMenuItem : style.subMenuItem}
key={session.id}>
<Link href="#" UNSAFE_className={style.menuItemLink}
onPress={() => handleRecent(session)}>{session.name}</Link>
</li>
</>
);
})}
</ul>
</Flex>
Expand Down

0 comments on commit 3ea4ce6

Please sign in to comment.