-
Notifications
You must be signed in to change notification settings - Fork 13
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
Org profile page #659
Org profile page #659
Conversation
hdJerry
commented
Sep 29, 2022
•
edited
Loading
edited
This pull request is automatically being deployed by Amplify Hosting (learn more). |
This pull request is automatically being deployed by Amplify Hosting (learn more). |
<div class="q-pt-md q-mx-auto"> | ||
<div class="row items-center" v-if="!loadingOrgProfileDetail"> | ||
<span class="company_logo q-mr-sm rounded-borders"> | ||
<img :src="orgProfileDetail?.avatarUrl" alt="company logo" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hide image if the a orgProfileDetail?.avatarUrl is not a valid src
</small> | ||
</div> | ||
<div> | ||
<a :href="'/' + username" class="row items-center clear-filter"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move link composing logic into computed
); | ||
} else if (sortByData.value?.sortby === SORT_OPTIONS.stars) { | ||
response.sort((a, b) => | ||
b.node.stargazerCount > a.node.stargazerCount ? 1 : -1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if equal? it can cause different result for different order and count. Handle 0 as you did above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this is valid. We are sorting, yeah, so if ) then it will be at the end.
); | ||
} else { | ||
response.sort((a, b) => | ||
getTime(b.node.updatedAt) - getTime(a.node.updatedAt) ? 1 : -1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same as above
if ( | ||
search !== '' && | ||
!repo?.node.name?.toLocaleLowerCase().includes(search.toLocaleLowerCase()) | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ( | |
search !== '' && | |
!repo?.node.name?.toLocaleLowerCase().includes(search.toLocaleLowerCase()) | |
) { | |
if ( | |
search && | |
!repo?.node.name?.toLocaleLowerCase().includes(search.toLocaleLowerCase()) | |
) { |
}); | ||
} | ||
}); | ||
languages.sort((a, b) => (a.name > b.name ? 1 : -1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same as above
width: 32px; | ||
height: 32px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use em
/> | ||
<span | ||
class="tab_label q-mx-sm" | ||
:class="{ 'text-weight-bold': tab === 'packages' }" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move tabs values to enum. Do not harddcode them. It is hard to maintain
export const inArray = ( | ||
array: ArrayData[], | ||
target: string, | ||
): { name: string } | undefined => { | ||
return array.find((arr) => arr.name === target); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const inArray = ( | |
array: ArrayData[], | |
target: string, | |
): { name: string } | undefined => { | |
return array.find((arr) => arr.name === target); | |
}; | |
export const inArray = ( | |
array: ArrayData[], | |
target: string, | |
): ArrayData | undefined => { | |
return array.find((arr) => arr.name === target); | |
}; |
if (filterText.endsWith('s')) { | ||
if (filterText.match(new RegExp('forks', 'i'))) { | ||
filterText = filterText.replace('s', 'ed'); | ||
} else { | ||
filterText = filterText.replace('s', ''); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if the work contans multiple 's' letters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the formatting rules. The mockServiceWorker.js
looks to be re-formatted
✅ Deploy Preview for cra-rxjs-styled-components canceled.
|
✅ Deploy Preview for next-react-query-tailwind canceled.
|
✅ Deploy Preview for angular-apollo-tailwind canceled.
|
✅ Deploy Preview for starter-dev-backend canceled.
|
✅ Deploy Preview for nuxt-pinia-tailwind canceled.
|
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Hi @hdJerry. 👋 Your PR has been approved and merged. 🎉 Thank you for your continued contributions to the starter.dev GitHub showcases repo. ❤️ Keep up the great work! |