Skip to content

Commit

Permalink
fix format error
Browse files Browse the repository at this point in the history
  • Loading branch information
yuval-hazaz committed Aug 18, 2023
1 parent c532d70 commit a826a90
Show file tree
Hide file tree
Showing 83 changed files with 432 additions and 377 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Fixes: amplication/amplication#[issue-number]
<!-- Explain the details for making this change. What existing problem does the pull request solve? -->

## PR Checklist

- [ ] `npm run test` doesn't throw any error

IMPORTANT: Please review the [CONTRIBUTING.md](https://github.com/amplication/amplication/blob/master/CODE_OF_CONDUCT.md) file for detailed contributing guidelines.
5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"cSpell.words": [
"HUBSPOT",
"Microservices"
]
"cSpell.words": ["HUBSPOT", "Microservices"]
}
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,19 @@ Experience the fastest way to develop Node.js applications with Amplication.
First of all, it should be mentioned that there two possible modes: production and development.

### Production Mode

In order to run the server for production mode these commands have to be executed:

```bash
npm run build
npm run start
```

After the first command all the static pages will be save as json and html files as cache files.
The second command starts the server, which is usually [http://localhost:3001](http://localhost:3001)

### Development Mode

For starting the development server:

```bash
Expand All @@ -77,4 +80,4 @@ The [API routes](https://nextjs.org/docs/api-routes/introduction) can be accesse
## Deployment

Both the Amplication `website`, `blog server` and `blog admin-ui`, are hosted on the staging cluster aswell as the production cluster. The repository follows a similar approach to the main amplication repository, where the staging environment will be deployed by commits to `master` and the a release - i.e., a tag of a specific commit on master - will deploy to the production environment.
Both the Amplication `website`, `blog server` and `blog admin-ui`, are hosted on the staging cluster aswell as the production cluster. The repository follows a similar approach to the main amplication repository, where the staging environment will be deployed by commits to `master` and the a release - i.e., a tag of a specific commit on master - will deploy to the production environment.
20 changes: 10 additions & 10 deletions components/Common/CardsList/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import Image from 'next/image';
import icon1 from '../../../public/images/icons/icon-1.svg';
import PropTypes from 'prop-types';

import {useEffect, useState} from 'react';
import { useEffect, useState } from 'react';

import 'swiper/css';
import {Swiper, SwiperSlide} from 'swiper/react';
import {Autoplay} from 'swiper';
import { Swiper, SwiperSlide } from 'swiper/react';
import { Autoplay } from 'swiper';

const CardsList = ({title, subTitle, cards, customClasses}) => {
const CardsList = ({ title, subTitle, cards, customClasses }) => {
const [isMobile, setIsMobile] = useState(true);

useEffect(() => {
Expand Down Expand Up @@ -64,13 +64,13 @@ const CardsList = ({title, subTitle, cards, customClasses}) => {
)}
<span
className="mt-2 text-xl mb-1 font-semibold text-center text-[24px]"
style={{color: '#A787FF'}}
dangerouslySetInnerHTML={{__html: item.title}}
style={{ color: '#A787FF' }}
dangerouslySetInnerHTML={{ __html: item.title }}
></span>
{item.subTitle && (
<span
className="font-light text-[18px] tablet:!text-base laptop:!text-lg leading-normal text-center text-white max-w-[360px]"
dangerouslySetInnerHTML={{__html: item.subTitle}}
dangerouslySetInnerHTML={{ __html: item.subTitle }}
></span>
)}
</SwiperSlide>
Expand All @@ -93,13 +93,13 @@ const CardsList = ({title, subTitle, cards, customClasses}) => {
)}
<span
className="mt-2 text-xl mb-1 font-semibold text-center text-[24px]"
style={{color: '#A787FF'}}
dangerouslySetInnerHTML={{__html: item.title}}
style={{ color: '#A787FF' }}
dangerouslySetInnerHTML={{ __html: item.title }}
></span>
{item.subTitle && (
<span
className="font-light text-[18px] tablet:!text-base laptop:!text-lg leading-normal text-center text-white max-w-[360px]"
dangerouslySetInnerHTML={{__html: item.subTitle}}
dangerouslySetInnerHTML={{ __html: item.subTitle }}
></span>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/Common/Chip/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';

const Chip = ({children}) => {
const Chip = ({ children }) => {
return <span className="chip">{children}</span>;
};

Expand Down
8 changes: 4 additions & 4 deletions components/Common/CtaBanner/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {useCallback} from 'react';
import { useCallback } from 'react';
import Button from '../Button';
import PropTypes from 'prop-types';
import * as analytics from '../../../lib/analytics';
import {useRouter} from 'next/router';
import { useRouter } from 'next/router';

const CtaBanner = ({bgVersion, title, subTitle, buttonText, buttonUrl}) => {
const CtaBanner = ({ bgVersion, title, subTitle, buttonText, buttonUrl }) => {
const router = useRouter();

const handleStartNowClick = useCallback(() => {
Expand All @@ -16,7 +16,7 @@ const CtaBanner = ({bgVersion, title, subTitle, buttonText, buttonUrl}) => {
pageUri: router.asPath,
},
});
},[bgVersion,router.asPath]);
}, [bgVersion, router.asPath]);

const bgStyle =
bgVersion === 'version1'
Expand Down
6 changes: 3 additions & 3 deletions components/Common/FeatureItem/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import Image from 'next/image';
import Link from 'next/link';

const FeatureItem = ({image, alt, title, content, linkUrl, linkText}) => {
const FeatureItem = ({ image, alt, title, content, linkUrl, linkText }) => {
return (
<>
<div className="feature-item">
Expand All @@ -14,11 +14,11 @@ const FeatureItem = ({image, alt, title, content, linkUrl, linkText}) => {
<div className="feature-item__content">
<div
className="feature-item__title"
dangerouslySetInnerHTML={{__html: title}}
dangerouslySetInnerHTML={{ __html: title }}
></div>
<div
className="feature-item__description text-base"
dangerouslySetInnerHTML={{__html: content}}
dangerouslySetInnerHTML={{ __html: content }}
></div>
{linkText && linkUrl && (
<Link href={linkUrl} passHref={true}>
Expand Down
12 changes: 6 additions & 6 deletions components/Common/HubSpotForm/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {useRef, useState} from 'react';
import {useRouter} from 'next/router';
import { useRef, useState } from 'react';
import { useRouter } from 'next/router';
import PropTypes from 'prop-types';
import * as analytics from '../../../lib/analytics';

Expand All @@ -22,12 +22,12 @@ const HubSpotForm = ({
const router = useRouter();
const form = useRef(null);

const submitSubscriptionForm = async e => {
const submitSubscriptionForm = async (e) => {
e.preventDefault();
const formData = new FormData(form.current);

const fields = [];
[...formData].forEach(item => {
[...formData].forEach((item) => {
if (item[1]) {
fields.push({
name: item[0],
Expand All @@ -54,7 +54,7 @@ const HubSpotForm = ({
pageName: pageName,
},
}),
}
},
);
const data = await response.json();
if (data.inlineMessage) {
Expand Down Expand Up @@ -86,7 +86,7 @@ const HubSpotForm = ({
<form
className="hubspot w-full flex flex-col justify-start items-stretch laptop:flex-row laptop:flex-wrap laptop:items-start laptop:justify-between"
method="POST"
onSubmit={e => submitSubscriptionForm(e)}
onSubmit={(e) => submitSubscriptionForm(e)}
ref={form}
>
{children}
Expand Down
2 changes: 1 addition & 1 deletion components/Common/SharingBlock/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {useEffect, useState} from 'react';
import { useEffect, useState } from 'react';
import {
LinkedinShareButton,
FacebookShareButton,
Expand Down
12 changes: 6 additions & 6 deletions components/Common/SubscribeForm/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {useState, useRef} from 'react';
import {useRouter} from 'next/router';
import { useState, useRef } from 'react';
import { useRouter } from 'next/router';
import PropTypes from 'prop-types';
import * as analytics from '../../../lib/analytics';

Expand All @@ -13,19 +13,19 @@ const HUBSPOT_FORM_ID = '3f7e736b-6f89-4a11-94e4-eac111c43486';
const SUCCESS_MESSAGE = 'Thank you for signing up for our mailing list!';
const ERROR_MESSAGE = 'Something went wrong. Please try again later.';

const SubscribeForm = ({isCompactView}) => {
const SubscribeForm = ({ isCompactView }) => {
const [successMsg, setSuccessMsg] = useState('');
const [formIsSending, setFormIsSending] = useState(false);
const router = useRouter();

const form = useRef(null);

const submitSubscriptionForm = async e => {
const submitSubscriptionForm = async (e) => {
e.preventDefault();
const formData = new FormData(form.current);

const fields = [];
[...formData].forEach(item => {
[...formData].forEach((item) => {
if (item[1]) {
fields.push({
name: item[0],
Expand All @@ -52,7 +52,7 @@ const SubscribeForm = ({isCompactView}) => {
pageName: 'Blog Page',
},
}),
}
},
);
const data = await response.json();
if (data.inlineMessage) {
Expand Down
2 changes: 1 addition & 1 deletion components/Common/TeamMember/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import Image from 'next/image';
import Link from 'next/link';

const TeamMember = ({name, position, image, links}) => {
const TeamMember = ({ name, position, image, links }) => {
return (
<>
<div className="team-member">
Expand Down
2 changes: 1 addition & 1 deletion components/Common/WidePanelWithImage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const WidePanelWithImage = ({
</div>
<div
className="text-sm desktop:text-lg text-white desktop:!leading-[27px] max-w-[600px]"
dangerouslySetInnerHTML={{__html: content}}
dangerouslySetInnerHTML={{ __html: content }}
></div>
{children}
<div className="buttons-wrapper d-flex tablet:align-items-center justify-content-start mt-4">
Expand Down
2 changes: 1 addition & 1 deletion components/Footer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import StartNow from '../../components/Sections/About/StartNow';
import FooterBottomBar from './FooterBottomBar';
import PropTypes from 'prop-types';

const Footer = ({customClass, compactView, hideBanner}) => {
const Footer = ({ customClass, compactView, hideBanner }) => {
return (
<>
<footer
Expand Down
14 changes: 7 additions & 7 deletions components/Header/BottomBar/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {useEffect, useState} from 'react';
import {useRouter} from 'next/router';
import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import Link from 'next/link';

const BottomBar = () => {
Expand All @@ -14,19 +14,19 @@ const BottomBar = () => {
'https://api.github.com/repos/amplication/amplication/releases/latest',
{
method: 'GET',
}
},
)
.then(response => {
.then((response) => {
if (response.ok) {
return response.json();
}
})
.then(data => {
.then((data) => {
if (typeof data !== 'undefined' && data.name) {
setVersion(data.name);
}
})
.catch(error => {
.catch((error) => {
console.log(error);
});
}
Expand All @@ -46,7 +46,7 @@ const BottomBar = () => {
<Link href={'/enterprise'} passHref={true}>
<a
className="hidden float-right text-lg py-2 hover:text-white text-[#54DBEE] transition-all font-light relative ml-auto"
style={{top: '-' + scrollY + 'px'}}
style={{ top: '-' + scrollY + 'px' }}
>
Enterprise
</a>
Expand Down
2 changes: 1 addition & 1 deletion components/Header/Logo/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Link from 'next/link';
import Image from 'next/image';
import logoMobileImage from '../../../public/images/logo.svg';
import logoDesktopImage from '../../../public/images/logo_desktop.svg';
import {useEffect, useState} from 'react';
import { useEffect, useState } from 'react';

const Logo = () => {
const [isMobile, setIsMobile] = useState(true);
Expand Down
22 changes: 11 additions & 11 deletions components/Header/Menu/index.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import Link from 'next/link';
import Button from '../../Common/Button';
import {useRouter} from 'next/router';
import {useState, useEffect, useCallback} from 'react';
import { useRouter } from 'next/router';
import { useState, useEffect, useCallback } from 'react';
import useWindowSize from '../../../utils/useWindowSize';
import * as analytics from '../../../lib/analytics';

const Menu = () => {
const [isMobileMenuOpened, setIsMobileMenuOpened] = useState(false);
const [hoveredLink, setHoveredLink] = useState('');
const {width} = useWindowSize();
const {asPath} = useRouter();
const { width } = useWindowSize();
const { asPath } = useRouter();

const handleStartNowClick = useCallback(() => {
analytics.event({
Expand All @@ -18,16 +18,16 @@ const Menu = () => {
buttonLocation: 'header',
},
});
},[]);
}, []);

const handleMenuClick = useCallback(menuItem => {
const handleMenuClick = useCallback((menuItem) => {
if (menuItem && menuItem.onClickEventName) {
analytics.event({
action: menuItem.onClickEventName,
params: menuItem.onClickEventParams,
});
}
},[]);
}, []);

const menuItems = [
{
Expand Down Expand Up @@ -86,7 +86,7 @@ const Menu = () => {
},
target: '_self',
isActive: Boolean(
asPath.includes('/tags') || asPath.includes('/blog')
asPath.includes('/tags') || asPath.includes('/blog'),
),
},
{
Expand Down Expand Up @@ -199,21 +199,21 @@ const Menu = () => {
onMouseOver={() => {
if (width > 991) {
setHoveredLink(
hoveredLink === '' ? item.href.pathname : ''
hoveredLink === '' ? item.href.pathname : '',
);
}
}}
onMouseOut={() => {
if (width > 991) {
setHoveredLink(
hoveredLink === '' ? item.href.pathname : ''
hoveredLink === '' ? item.href.pathname : '',
);
}
}}
onClick={() => {
if (width <= 991) {
setHoveredLink(
hoveredLink === '' ? item.href.pathname : ''
hoveredLink === '' ? item.href.pathname : '',
);
}
}}
Expand Down
Loading

0 comments on commit a826a90

Please sign in to comment.