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

feat: add tech company logos #8

Merged
merged 2 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 8 additions & 4 deletions src/pages/tech-companies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,14 @@ export default function TechCompaniesPage() {
<div>
<div className="flex justify-center">
<img
src={`https://ui-avatars.com/api/?bold=true&background=random&color=ffffff&name=${company.name}`}
width={96}
height={96}
className="h-24 w-24 rounded-full object-cover"
src={`https://raw.githubusercontent.com/Know-Nepal/tech-companies/main/logos/${company.logoName}`}
width={128}
thenishantsapkota marked this conversation as resolved.
Show resolved Hide resolved
height={128}
thenishantsapkota marked this conversation as resolved.
Show resolved Hide resolved
className="h-24 w-24 rounded object-cover"
onError={({ currentTarget }) => {
currentTarget.onerror = null;
currentTarget.src = `https://ui-avatars.com/api/?bold=true&background=random&color=ffffff&name=${company.name}`;
}}
/>
</div>

Expand Down
1 change: 1 addition & 0 deletions src/types/apis.types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export interface IApiTechCompany {
name: string;
logoName: string;
establishedAt: number;
location: string;
website: string;
Expand Down