Skip to content

Commit

Permalink
Script, Link , Image Components in nextjs done
Browse files Browse the repository at this point in the history
  • Loading branch information
unstoppableayush committed Feb 26, 2024
1 parent 4870039 commit 4f4bbd8
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
7 changes: 6 additions & 1 deletion NextJS/123_script_link_image_component/app/about/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ const about = () => {
)
}

export default about
export default about

export const metadata = {
title: "About Facebook - Contact with peoples",
description: "This is about facebook",
};
12 changes: 10 additions & 2 deletions NextJS/123_script_link_image_component/app/contact/page.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import React from 'react'

import Script from 'next/script'

const contact = () => {
return (
<div>
<Script>
{` alert("welcome to contact page");`}
</Script>
I am Contact
</div>
)
}

export default contact
export default contact

export const metadata = {
title: "Contact Facebook - Contact with peoples",
description: "This is Contact facebook",
};
4 changes: 3 additions & 1 deletion NextJS/123_script_link_image_component/app/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import Image from "next/image";

export default function Home() {
return (
<div>
<div className="size-80 bg-rose-300">
I am Home

<Image className="object-contain " height={500} width={500} src="https://www.simplilearn.com/ice9/free_resources_article_thumb/html_image_slider.jpg" alt="" />
</div>
);
}
13 changes: 12 additions & 1 deletion NextJS/123_script_link_image_component/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'www.simplilearn.com',
port: '',

},
],
},
};

export default nextConfig;

0 comments on commit 4f4bbd8

Please sign in to comment.