Skip to content
Open
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions src/data/json_stub.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
"description": "Moteur de recherche via le nom de films réalisée avec ReactJs:\nRequête à l'Api rest avec Fetch, utilisation des hooks.\n",
"id": "7f1f4257-e5db-477d-aa5f-ababe0ab0b12",
"images": [{ "url": "https://cdn.filestackcontent.com/aBOkTTkCQ66VOHUy0q8L" }],
"link": "https://lovely-movie.netlify.app/",
"url": "https://lovely-movie.netlify.app/",
"name": "Lovely Movie",
"endDate": "2019-12-01"
},
Expand All @@ -201,7 +201,7 @@
"description": "Application de gestion de tâches réalisée avec ReactJs / Redux / Firebase :\nCréation de composants avec Styled Components, gestions de formulaires et validation des entrées, création d'une authentification, récupération / création / modification / suppression de tâches.",
"id": "af4181b1-8955-47fb-8dd9-17c6974335d3",
"images": [{ "url": "https://cdn.filestackcontent.com/G2CckiqvScC9tsrvHYg4" }],
"link": "https://diary-todo.netlify.app/",
"url": "https://diary-todo.netlify.app/",
"name": "Journal d'une Todo",
"endDate": "2020-01-01"
},
Expand All @@ -211,7 +211,7 @@
"description": "Blog réalisé en Java JEE et Spring, avec création d'une base de données MySQL et connectée avec JDBC.",
"id": "af8c78c3-f7c6-4f3b-9c32-9d37a9032e14",
"images": [{ "url": "https://cdn.filestackcontent.com/rPp0wj4S2GhTr0qTcqOI" }],
"link": "https://btz-java-2003-pjt1-blog.javarover.wilders.dev/",
"url": "https://btz-java-2003-pjt1-blog.javarover.wilders.dev/",
"name": "Charlie's Angels blog",
"endDate": "2020-06-01"
},
Expand All @@ -221,7 +221,7 @@
"description": "** Pensée uniquement pour téléphone **\nApplication permettant de connaître la météo actuelle d'une ville. Réalisée afin de découvrir VueJs.",
"id": "c64e6ca1-6300-4d7f-a305-8cfb7c99a9e6",
"images": [{ "url": "https://cdn.filestackcontent.com/w5oskUihSiYCxekOn9Ba" }],
"link": "https://appli-meteo.netlify.app/",
"url": "https://appli-meteo.netlify.app/",
"name": "Application Météo",
"endDate": "2020-06-01"
},
Expand All @@ -231,7 +231,7 @@
"description": "Premières armes avec Angular et Typescript :\nMise en place d'un environnement Angular, développement d'une authentification avec Firebase, gestion des formulaires, utilisation d'observable avec RxJs.\n",
"id": "d9f7ca32-a40a-418e-affb-317bfb4f520e",
"images": [{ "url": "https://cdn.filestackcontent.com/NVOhKNFQR9OQ3jtkIyHi" }],
"link": "https://my-connected-library.netlify.app/",
"url": "https://my-connected-library.netlify.app/",
"name": "Librairie Connectée",
"endDate": "2020-08-01"
},
Expand All @@ -241,7 +241,7 @@
"description": "Moteur de recherche basé sur le jeu World of Warcraft, premiers pas avec ReatJs.\nRequête à l'API Raider.io avec Axios.",
"id": "dbe2a8d9-dd9d-443d-8ae4-7a8e0b7939f5",
"images": [{ "url": "https://cdn.filestackcontent.com/FSysoX0ATvqy2BFvLF21" }],
"link": "https://wow-search-engine.netlify.app/",
"url": "https://wow-search-engine.netlify.app/",
"name": "WoW Search",
"endDate": "2019-05-01"
},
Expand All @@ -251,7 +251,7 @@
"description": "Application réalisée en 24h (challenge de formation) avec Java JEE et Spring:\nGestion d’un CRUD, création d'une API Rest, ajout d'un environnement de production avec une base de données PostgreSQL hébergée sur Heroku.",
"id": "ffb8a4f2-24e6-44ef-bbe7-0593b86d40be",
"images": [{ "url": "https://cdn.filestackcontent.com/7XpHKtFTC2VynppurrK5" }],
"link": "https://your-todos-list.herokuapp.com/",
"url": "https://your-todos-list.herokuapp.com/",
"name": "Your Todo List",
"endDate": "2020-07-01"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback, useMemo } from 'react';

import { FormattedMessage } from 'react-intl';
import { useTheme } from "@mui/styles";
import { useTheme } from '@mui/styles';
import makeStyles from '@mui/styles/makeStyles';

import { Typography } from '@welovedevs/ui';
Expand Down Expand Up @@ -60,21 +60,21 @@ const Details = ({ project, index, onDelete, classes }) => {

const color = getColorsFromCardVariant(theme, variant).backColor;

const projectLink = project.link;
const projectUrl = project.url;

const link = useMemo(() => {
if (!new RegExp(HttpRegex).test(projectLink)) {
return `http://${projectLink}`;
const url = useMemo(() => {
if (!new RegExp(HttpRegex).test(projectUrl)) {
return `http://${projectUrl}`;
}
return projectLink;
}, [projectLink]);
return projectUrl;
}, [projectUrl]);

return (
<div className={classes.details}>
{project.link && (
{projectUrl && (
<div className={classes.detail}>
<AnimatedUnderlinedButton color={color}>
<a className={classes.link} href={link}>
<a className={classes.link} href={url}>
<Typography classes={{ container: classes.salary }} color={color}>
<LinkIcon className={classes.detailIcon} />
<FormattedMessage id="Project.section.link" defaultMessage="Link" />
Expand Down