Skip to content

Commit

Permalink
96894 - tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
jquispe-oddball committed Dec 26, 2024
1 parent af58d7e commit 08a41b4
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { useLoaderData, Link } from 'react-router-dom';
import { useLoaderData, Link, useSearchParams } from 'react-router-dom';
import {
formatDateParsedZoneLong,
timeFromNow,
Expand Down Expand Up @@ -34,19 +34,21 @@ const expiresSoon = expDate => {
return null;
};

const POARequestCard = ({ cssClass }) => {
const POARequestCard = () => {
const data = useLoaderData();
const [searchParams] = useSearchParams();
const status = searchParams.get('status');
return (
<div
className={cssClass}
id={`panel-${cssClass}`}
className={status}
id={`panel-${status}`}
role="tabpanel"
aria-labelledby={`${cssClass}`}
aria-labelledby={`${status}`}
>
{cssClass === 'poa-request__pending' ? (
<h2 data-testid="poa-requests-table-heading">Pending requests</h2>
) : (
{status === 'completed' ? (
<h2 data-testid="poa-requests-table-heading">Completed requests</h2>
) : (
<h2 data-testid="poa-requests-table-heading">Pending requests</h2>
)}

<ul
Expand Down

0 comments on commit 08a41b4

Please sign in to comment.