This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
const Home = () => { | |
return <h1>Welcome to My Next App!</h1>; | |
}; | |
export default Home; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { mount } from "enzyme"; | |
import Home from "../../pages/index"; | |
describe("Pages", () => { | |
describe("Home", () => { | |
it("should render without throwing an error", function () { | |
const wrap = mount(<Home />); | |
expect(wrap.find("h1").text()).toBe("Welcome to My Next App!"); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
background: #f1f1f1; | |
max-width: 100%; | |
} | |
body { | |
background: linear-gradient( | |
315deg, | |
var(#f1f1f1) 0%, | |
var(#e7e7e7) 100% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es5", | |
"lib": ["dom", "dom.iterable", "esnext"], | |
"allowJs": true, | |
"skipLibCheck": true, | |
"strict": true, | |
"forceConsistentCasingInFileNames": true, | |
"noEmit": true, | |
"esModuleInterop": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import global css here | |
import "../styles/global.scss"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
module.exports = { | |
webpackFinal: async (baseConfig, options) => { | |
const { module = {} } = baseConfig; | |
const newConfig = { | |
...baseConfig, | |
module: { | |
...module, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require("path"); | |
module.exports = { | |
stories: ["../components/**/*.stories.tsx"], | |
addons: ["@storybook/preset-typescript"], | |
// Add nextjs preset | |
presets: [path.resolve(__dirname, "./next-preset.js")], | |
}; |
NewerOlder