Skip to content

Commit

Permalink
intento de arreglo del error de rehydration
Browse files Browse the repository at this point in the history
  • Loading branch information
clara7227 committed Jun 10, 2024
1 parent 97b12b5 commit 45c86df
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 10 deletions.
2 changes: 2 additions & 0 deletions app/i18n.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
Expand Down
2 changes: 2 additions & 0 deletions components/BulletElement.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import React,{useEffect, useRef} from "react";
import { useTranslation } from 'react-i18next';
import { myBulletElements } from "@/constants/BulletElement";
Expand Down
4 changes: 3 additions & 1 deletion components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import React from "react";
import Link from "next/link";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
Expand Down Expand Up @@ -57,7 +59,7 @@ export default function Footer(props) {
: "text-left mb-2 font-medium"
}
>
<Link className="font-medium" href={route.route}>
<Link suppressHydrationWarning className="font-medium" href={route.route}>
{t(route.key)}
</Link>
</li>
Expand Down
4 changes: 3 additions & 1 deletion components/Header.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import React from "react";
import Link from "next/link";
import { useState, useEffect } from "react";
Expand Down Expand Up @@ -77,7 +79,7 @@ export default function Header(props) {
key={index}
className={route.route === props.route ? "li-selected" : ""}
>
<Link href={route.route}>{t(route.key)}</Link>
<Link href={route.route} suppressHydrationWarning >{t(route.key)}</Link>
</li>
))}
</ul>
Expand Down
2 changes: 2 additions & 0 deletions components/LangSwitcher.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { useTranslation } from 'react-i18next';
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faGlobe } from "@fortawesome/free-solid-svg-icons";
Expand Down
2 changes: 2 additions & 0 deletions components/NavElement.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import React from "react";

function Nav(props) {
Expand Down
16 changes: 8 additions & 8 deletions components/RecentPublications.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ export default function RecentPublications(props) {
.filter((i, index) => index < 4)
.map(({ doi, title, author, date, stroke, content }, index) => {
return (
<a
key={doi}
href={doi}
target="_blank"
rel="noopener noreferrer"
>
<div className={`article`}>
// <a
// key={doi}
// href={doi}
// target="_blank"
// rel="noopener noreferrer"
// >
<div key={doi} className={`article`}>
<div className={`article_stroke ${stroke}`}></div>
<div className="article_content">
<div className="article_date">
Expand All @@ -54,7 +54,7 @@ export default function RecentPublications(props) {
) : null}
</div>
</div>
</a>
// </a>
);
})}
</Masonry>
Expand Down
2 changes: 2 additions & 0 deletions components/ResearchFilter.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import React from 'react';
import { useTranslation } from 'react-i18next';

Expand Down
2 changes: 2 additions & 0 deletions components/gridElement.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import react from "react";
import Masonry, { ResponsiveMasonry } from "react-responsive-masonry";
import { useTranslation } from 'react-i18next';
Expand Down
2 changes: 2 additions & 0 deletions components/projectCard.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import React, { useState } from "react";
import Link from "next/link";
import { myProjectCards } from "@/constants/projectsCards";
Expand Down

0 comments on commit 45c86df

Please sign in to comment.