Skip to content

Commit

Permalink
feat: добавлены примеры картинок (и статических и внешних)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxseev committed Nov 24, 2022
1 parent 4e51b54 commit 36aca12
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
14 changes: 12 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const {withAxiom} = require('next-axiom');
/* eslint-disable @typescript-eslint/no-var-requires */

const {withAxiom} = require("next-axiom")
const {withSentryConfig} = require("@gooditworks/monitoring/next")

const isDeploy = ["production", "preview"].includes(process.env.VERCEL_ENV)
Expand All @@ -11,10 +13,18 @@ const sentryConfig = {
const config = {
sentry: {
disableServerWebpackPlugin: !isDeploy,
disableClientWebpackPlugin: !isDeploy,
disableClientWebpackPlugin: !isDeploy
},
experimental: {
appDir: true
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "www.freecodecamp.org",
}
]
}
}

Expand Down
Binary file added public/gooditworks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 18 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
import {FC} from "react"
import Image from "next/image"

const IndexPage: FC = () => <h2>TODO: put README there</h2>
import giwLogo from "public/gooditworks.png"

const IndexPage: FC = () => (
<div className="p-4">
<h2>TODO: put README there</h2>
<p>btw, our logo (static):</p>
<Image src={giwLogo} alt="Good iT Works logo" sizes="100vw" />
<p>and nice Next.js meme (external url)</p>
<Image
src="https://www.freecodecamp.org/news/content/images/2020/08/meme.jpg"
alt="meme about next.js"
width={888}
height={499}
sizes="100vw"
/>
</div>
)

export default IndexPage
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"exclude": ["node_modules"],
"compilerOptions": {
"baseUrl": "src",
"paths": {
"public/*": ["../public/*"]
},
"moduleResolution": "node",
"module": "commonjs",
"jsx": "preserve",
Expand Down

0 comments on commit 36aca12

Please sign in to comment.