Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions additional.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
import 'styled-components';
import type {theme} from '@/src/style';

declare module '*.module.css';

type CustomTheme = typeof theme;

declare module 'styled-components' {
/* eslint-disable-next-line @typescript-eslint/consistent-type-definitions, @typescript-eslint/no-empty-object-type */
export interface DefaultTheme extends CustomTheme {}
}
8 changes: 0 additions & 8 deletions app/index.css

This file was deleted.

16 changes: 10 additions & 6 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
import type {ReactNode} from 'react';

import {StoreProvider} from '@/src/state/StoreProvider';
import './index.css';
import {StyledComponentsRegistry, ThemeProvider} from '@/src/style';

type Props = {
readonly children: ReactNode;
};

export default function RootLayout({children}: Props) {
return (
<html lang="en" suppressHydrationWarning>
<body>
<StoreProvider>{children}</StoreProvider>
</body>
</html>
<StoreProvider>
<ThemeProvider>
<html lang="en" suppressHydrationWarning>
<body>
<StyledComponentsRegistry>{children}</StyledComponentsRegistry>
</body>
</html>
</ThemeProvider>
</StoreProvider>
);
}
4 changes: 2 additions & 2 deletions generate-react-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"withHookTest": false,
"customTemplates": {
"component": "templates/Component/TemplateName.tsx",
"style": "templates/Component/TemplateName.module.css",
"style": "templates/Component/TemplateName.style.ts",
"index": "templates/Component/index.ts",
"test": "templates/Component/TemplateName.spec.tsx"
}
Expand All @@ -34,7 +34,7 @@
"withHookTest": false,
"customTemplates": {
"component": "templates/Loading/TemplateName.tsx",
"style": "templates/Loading/TemplateName.module.css",
"style": "templates/Loading/TemplateName.style.ts",
"index": "templates/Loading/index.ts",
"test": "templates/Loading/TemplateName.spec.tsx"
}
Expand Down
5 changes: 4 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
module.exports = withBundleAnalyzer({
reactStrictMode: true,
distDir: 'build',
output: process.env.PAGES_BUILD === 'true' ? 'export' : undefined,
cleanDistDir: true,
output: process.env.PAGES_BUILD === 'true' ? 'export' : undefined,
basePath: process.env.PAGES_BUILD === 'true' ? '/ts-redux-next' : undefined,
compiler: {
styledComponents: true,
},
});
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"start": "next start",
"lint:code": "next lint",
"fix:code": "run-s 'lint:code --fix'",
"lint:style": "stylelint 'src/**/*.css'",
"fix:style": "stylelint 'src/**/*.css' --fix",
"lint:style": "stylelint 'src/**/*.{ts,tsx}'",
"fix:style": "stylelint 'src/**/*.{ts,tsx}' --fix",
"lint:tsc": "tsc --pretty --noEmit",
"prepare": "is-ci || husky",
"test": "jest",
Expand All @@ -36,6 +36,7 @@
"react-dom": "19.0.0",
"react-redux": "9.2.0",
"redux": "5.0.1",
"styled-components": "6.1.15",
"uniqid": "5.4.0"
},
"devDependencies": {
Expand All @@ -59,6 +60,7 @@
"eslint-config-next": "15.1.6",
"eslint-config-prettier": "10.0.2",
"eslint-plugin-prettier": "5.2.3",
"eslint-plugin-react-hooks": "5.2.0",
"generate-react-cli": "8.4.9",
"husky": "9.1.7",
"is-ci": "4.1.0",
Expand All @@ -68,6 +70,7 @@
"npm-run-all2": "7.0.2",
"postcss": "8.5.1",
"postcss-preset-env": "10.1.3",
"postcss-styled-syntax": "0.7.1",
"prettier": "3.4.2",
"redux-mock-store": "1.5.5",
"stylelint": "16.14.1",
Expand Down
Loading