Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ function CurrentSalaryCycle({ title = "Current Salary Cycle", cycleIndex }) {
);
}

export function FellowshipCurrentSalaryCycleLoading() {
export function FellowshipCurrentSalaryCycleLoading({
title = "Current Salary Cycle",
}) {
return (
<SummaryItem
title={
<div className="text12Medium text-textTertiary space-x-1">
<span className="text12Medium text-textTertiary">
Current Salary Cycle
</span>
<span className="text12Medium text-textTertiary">{title}</span>
</div>
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ import CollectivesProvider from "next-common/context/collectives/collectives";
import { isNil } from "lodash-es";
import { useFellowshipSalaryStats } from "next-common/hooks/fellowship/salary/useFellowshipSalaryStats";

function FellowshipCurrentSalaryCycleSummary() {
function FellowshipCurrentSalaryCycleSummary({ title }) {
const fellowshipSalaryStats = useFellowshipSalaryStats();

if (
isNil(fellowshipSalaryStats) ||
isNil(fellowshipSalaryStats?.cycleIndex)
) {
return <FellowshipCurrentSalaryCycleLoading />;
return <FellowshipCurrentSalaryCycleLoading title={title} />;
}

const { cycleIndex } = fellowshipSalaryStats;

return <FellowshipCurrentSalaryCycle cycleIndex={cycleIndex} />;
return <FellowshipCurrentSalaryCycle title={title} cycleIndex={cycleIndex} />;
}

export default function AllianceOverviewSummary() {
Expand All @@ -47,10 +47,10 @@ export default function AllianceOverviewSummary() {
/>
</SummaryItem>
<CollectivesProvider>
<FellowshipCurrentSalaryCycleSummary />
<FellowshipCurrentSalaryCycleSummary title="Fellowship Salary Cycle" />
</CollectivesProvider>
<CollectivesProvider section="secretary">
<FellowshipCurrentSalaryCycleSummary />
<FellowshipCurrentSalaryCycleSummary title="Secretary Salary Cycle" />
</CollectivesProvider>
</SummaryLayout>
);
Expand Down
Loading