Skip to content

Commit 2c420bb

Browse files
committed
Overview: Opportunities: internship links are linking slugs
1 parent d63222b commit 2c420bb

3 files changed

Lines changed: 36 additions & 35 deletions

File tree

community-app/frontend/src/components/overview/Opportunities.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async function sync(force)
4848
<li v-for="(job, index) in store.internships" :key="index" class="list-group-item d-flex flex-nowrap mt-0 mb-0 py-2 link">
4949
<NTag size="small" round :bordered="false" class="px-2 mr-3 text-muted">internship</NTag>
5050
<NEllipsis :line-clamp="1" :tooltip=false>
51-
<a :href="job.link" target="_blank" @click="(event)=>showBusinessProfile(job.title, event)">
51+
<a :href="job.link" target="_blank" @click.prevent="showBusinessProfile(job.slug)">
5252
{{ job.title }}
5353
</a>
5454
</NEllipsis>

community-app/frontend/src/components/overview/OpportunitiesStore.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,18 @@ async function fetchJobs(){
5858

5959
async function fetchInternships(){
6060

61-
const url = Constants.GET_COMPANIES+"?fields[]=name&filter[internships][_eq]=true&sort[]=-date_updated";
61+
const url = Constants.GET_COMPANIES+"?fields[]=name,slug&filter[internships][_eq]=true&sort[]=-date_updated";
6262

6363
const response = await fetch(url);
6464

6565
if (response.ok)
6666
{
6767
const json = await response.json();
68-
const companies = json.data?.map((h) => (
68+
const companies = json.data?.map((c) => (
6969
{
70-
title: h.name,
71-
link: '/business/'+h.name
70+
title: c.name,
71+
link: '/business/'+c.slug,
72+
slug: c.slug
7273
}
7374
));
7475

0 commit comments

Comments
 (0)