Skip to content

Commit 7a1493a

Browse files
Camillalalaladependabot[bot]snigdha-kansal
authored
Article branch to js-to-ts (#763)
* Bump eslint-config-next from 11.1.3 to 13.2.1 (#598) Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 11.1.3 to 13.2.1. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/commits/v13.2.1/packages/eslint-config-next) --- updated-dependencies: - dependency-name: eslint-config-next dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Snigdha Kansal <[email protected]> * changed newsArticle js to tsx * second commit - js to tsx * second commit - js to tsx * updated js to tsx --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Snigdha Kansal <[email protected]>
1 parent faae4a7 commit 7a1493a

File tree

4 files changed

+70
-61
lines changed

4 files changed

+70
-61
lines changed

components/NewsArticle.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

components/NewsArticle.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import Image from 'next/image';
2+
3+
interface ArticleProps {
4+
article: {
5+
link: string;
6+
image: string;
7+
alt: string;
8+
headline: string;
9+
};
10+
}
11+
12+
const Article: React.FC<ArticleProps> = ({ article }) => {
13+
return (
14+
<a target="_blank" rel="noreferrer noopener" href={article.link}>
15+
<div className="achievement">
16+
<Image
17+
src={article.image}
18+
width={360}
19+
height={200}
20+
objectFit="cover"
21+
alt={article.alt}
22+
/>
23+
<h3>{article.headline}</h3>
24+
</div>
25+
</a>
26+
);
27+
};
28+
29+
export default Article;

package-lock.json

Lines changed: 40 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dotenv": "^16.4.5",
1414
"googleapis": "^144.0.0",
1515
"moment": "^2.29.4",
16-
"next": "^15.1.6",
16+
"next": "^15.2.0",
1717
"next-seo": "^6.5.0",
1818
"react": "^18.3.1",
1919
"react-accessible-accordion": "^5.0.0",

0 commit comments

Comments
 (0)