mirror of
https://github.com/rjNemo/devbook_ts
synced 2026-06-11 13:06:43 +00:00
switch picture field to avatarUrl
This commit is contained in:
parent
cb716e9f17
commit
00aa71e9ee
2 changed files with 14 additions and 9 deletions
|
|
@ -1,7 +1,12 @@
|
||||||
import React, {FC} from 'react';
|
import React, {FC} from 'react';
|
||||||
|
// Routing
|
||||||
|
import {Link} from 'react-router-dom';
|
||||||
|
// Style
|
||||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||||
import {faCheck} from '@fortawesome/free-solid-svg-icons';
|
import {faCheck} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
// Typing
|
||||||
import {DevSummary} from '../models/Dev';
|
import {DevSummary} from '../models/Dev';
|
||||||
|
import Routes from '../constants/routes';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Present a dev profile succintly. Redirect to dev profile on click.
|
* Present a dev profile succintly. Redirect to dev profile on click.
|
||||||
|
|
@ -10,20 +15,20 @@ import {DevSummary} from '../models/Dev';
|
||||||
const DevProfile: FC<DevSummary> = ({
|
const DevProfile: FC<DevSummary> = ({
|
||||||
id,
|
id,
|
||||||
displayName,
|
displayName,
|
||||||
picture,
|
avatarUrl,
|
||||||
description,
|
description,
|
||||||
location,
|
location,
|
||||||
skills,
|
skills,
|
||||||
}) => (
|
}) => (
|
||||||
<div className="profile bg-light">
|
<div className="profile bg-light">
|
||||||
<img src={picture} alt={displayName} className="round-img" />
|
<img src={avatarUrl} alt={displayName} className="round-img" />
|
||||||
<div>
|
<div>
|
||||||
<h2>{displayName}</h2>
|
<h2>{displayName}</h2>
|
||||||
<p>{description}</p>
|
<p>{description}</p>
|
||||||
<p>{location}</p>
|
<p>{location}</p>
|
||||||
<a href="profile.html" className="btn btn-primary">
|
<Link to={`${Routes.PROFILE}/${id}`} className="btn btn-primary">
|
||||||
View Profile
|
View Profile
|
||||||
</a>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
{skills?.map((s, i) => (
|
{skills?.map((s, i) => (
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import Repo from '../types/Repo';
|
||||||
export interface DevSummary {
|
export interface DevSummary {
|
||||||
id: string;
|
id: string;
|
||||||
displayName: string;
|
displayName: string;
|
||||||
picture: string;
|
avatarUrl: string;
|
||||||
description: string;
|
description: string;
|
||||||
location: string;
|
location: string;
|
||||||
skills: string[];
|
skills: string[];
|
||||||
|
|
@ -38,7 +38,7 @@ export const blankDev: Dev = {
|
||||||
displayName: '',
|
displayName: '',
|
||||||
status: 'Developer',
|
status: 'Developer',
|
||||||
company: '',
|
company: '',
|
||||||
picture: '',
|
avatarUrl: '',
|
||||||
description: '',
|
description: '',
|
||||||
location: '',
|
location: '',
|
||||||
skills: [],
|
skills: [],
|
||||||
|
|
@ -66,7 +66,7 @@ export const dummyDev: Dev = {
|
||||||
displayName: 'John Doe',
|
displayName: 'John Doe',
|
||||||
status: 'Developer',
|
status: 'Developer',
|
||||||
company: 'Microsoft',
|
company: 'Microsoft',
|
||||||
picture:
|
avatarUrl:
|
||||||
'https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=200',
|
'https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=200',
|
||||||
description: 'Developer at Microsoft',
|
description: 'Developer at Microsoft',
|
||||||
location: 'Seattle, WA',
|
location: 'Seattle, WA',
|
||||||
|
|
@ -152,7 +152,7 @@ export const developers: DevSummary[] = [
|
||||||
{
|
{
|
||||||
id: '0',
|
id: '0',
|
||||||
displayName: 'John Doe',
|
displayName: 'John Doe',
|
||||||
picture:
|
avatarUrl:
|
||||||
'https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=200',
|
'https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=200',
|
||||||
description: 'Developer at Microsoft',
|
description: 'Developer at Microsoft',
|
||||||
location: 'Seattle, WA',
|
location: 'Seattle, WA',
|
||||||
|
|
@ -161,7 +161,7 @@ export const developers: DevSummary[] = [
|
||||||
{
|
{
|
||||||
id: '42',
|
id: '42',
|
||||||
displayName: 'Ruidy Nemausat',
|
displayName: 'Ruidy Nemausat',
|
||||||
picture:
|
avatarUrl:
|
||||||
'https://lh3.googleusercontent.com/a-/AOh14GhncH95MWKwPR3TRKy4eVd4n6w0-fobe4dhiam2xA',
|
'https://lh3.googleusercontent.com/a-/AOh14GhncH95MWKwPR3TRKy4eVd4n6w0-fobe4dhiam2xA',
|
||||||
description: 'Fullstack Engineer at DESY',
|
description: 'Fullstack Engineer at DESY',
|
||||||
location: 'Hamburg, DE',
|
location: 'Hamburg, DE',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue