Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dynamic project name before Community Snapshot #2651

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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 @@ -2,6 +2,7 @@
<section>
<lf-card class="!bg-gradient-to-b from-primary-25 to-white px-5 pt-5 pb-6">
<h6 class="text-h6 mb-4">
<div v-if="segmentName" class="text-secondary-300 text-tiny mb-1">{{ segmentName }}</div>
Community snapshot
</h6>
<div class="flex flex-wrap gap-y-4 -mx-4 overflow-hidden">
Expand Down Expand Up @@ -96,10 +97,16 @@ import LfLoading from '@/ui-kit/loading/Loading.vue';
import { MergeActionState } from '@/shared/modules/merge/types/MemberActions';
import LfContributorDetailsMaintainer
from '@/modules/contributor/components/details/overview/contributor-details-maintainer.vue';
import { computed } from 'vue';
import { getSegmentName } from '@/utils/segments';

const props = defineProps<{
contributor: Contributor,
}>();

const segmentName = computed(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

segments dont have name property use function getSegmentname

return props.contributor.segments?.[0] ? getSegmentName(props.contributor.segments[0]) : '';
});
</script>
<script lang="ts">
export default {
Expand Down
Loading