Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[_]: feat/husky #957

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion .github/workflows/pre-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:

- name: Install dependencies
run: yarn install
- name: Build project
- name: Build project before deployment
run: yarn build
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn build; yarn lint-staged;
6 changes: 6 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"*.{js,jsx,ts,tsx}": [
"eslint --fix",
"git add"
]
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"prod": "next export",
"cypress:open": "cypress open",
"cypress:run": "cypress run --browser chrome",
"lint": "eslint --quiet './**/*.{js,ts,tsx}'"
"lint": "eslint --quiet './**/*.{js,ts,tsx}'",
"postinstall": "husky"
},
"dependencies": {
"@cemalgnlts/mailjs": "^3.0.1",
Expand Down Expand Up @@ -81,6 +82,8 @@
"cypress": "^13.12.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^9.1.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.7",
"next-unused": "^0.0.6",
"postcss": "8.4.31",
"prettier": "2.7.1",
Expand Down
6 changes: 1 addition & 5 deletions src/components/home/HeroSection.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import dynamic from 'next/dynamic';
import { getImage } from '@/lib/getImage';
import { HomeText } from '@/assets/types/home';
import { GlobalDialog, useGlobalDialog } from '@/contexts/GlobalUIManager';
import TitleAndOnePlan from './components/heroSection/TitleAndOnePlan';
import { HomePageBannerForMobile } from '../banners/HomePageBannerForMobile';
const Animation = dynamic(() => import('./components/Animation'));
import Image from 'next/image';
import Header from '../shared/Header';
const Animation = dynamic(() => import('./components/Animation'));

interface HeroSectionForHomeProps {
textContent: HomeText['HeroSection'];
Expand All @@ -15,8 +13,6 @@ interface HeroSectionForHomeProps {
}

export default function HeroSection({ textContent, lang, isHomePageV2 }: HeroSectionForHomeProps): JSX.Element {
const { dialogIsOpen } = useGlobalDialog();
const shouldShowMobileBanner = dialogIsOpen(GlobalDialog.MobileBannerForHome);
const previewImg = getImage('/images/lifetime/file_item.webp');
const componentsFlow = isHomePageV2 ? 'flex-col-reverse' : 'flex-col';

Expand Down
Loading
Loading