Skip to content

Commit

Permalink
change npm package and cypress config
Browse files Browse the repository at this point in the history
  • Loading branch information
anshgoyalevil committed Aug 4, 2023
1 parent 481fd1f commit fd50f76
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 61 deletions.
10 changes: 5 additions & 5 deletions components/Hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import AlgoliaSearch, { SearchButton } from './AlgoliaSearch'; // Import Algolia
import IconLoupe from './icons/Loupe';
import {
useTranslation,
} from "next-i18next-static-site";
} from "i18n-static-site";

export default function Hero({ className = ''}) {
export default function Hero({ className = '' }) {

const { t } = useTranslation();

Expand All @@ -34,11 +34,11 @@ export default function Hero({ className = ''}) {
<strong>industry standard</strong> for defining asynchronous APIs.
</Heading>
<div className='flex flex-row items-center justify-center'>
<Button className="block md:inline-block" text="Read the docs" href="/docs" icon={<ArrowRight className="-mb-1 h-5 w-5" />}
data-testid="Hero-Button"/>
<Button className="block md:inline-block" text="Read the docs" href="/docs" icon={<ArrowRight className="-mb-1 h-5 w-5" />}
data-testid="Hero-Button" />
{/* Wrap SearchButton with AlgoliaSearch component */}
<AlgoliaSearch>
<SearchButton
<SearchButton
className="sm:flex items-center text-left space-x-3 px-4 py-3 ml-2 bg-white border-secondary-500 border text-secondary-500 hover:text-white shadow-md bg-secondary-100 hover:bg-secondary-500 transition-all duration-500 ease-in-out rounded-md"
>
{({ actionKey }) => (
Expand Down
2 changes: 1 addition & 1 deletion components/link.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Link from "next/link";
import { useRouter } from "next/router";
import { defaultLanguage, languages } from "next-i18next-static-site";
import { defaultLanguage, languages } from "i18n-static-site";

const LinkComponent = ({ children, locale, ...props }) => {
const router = useRouter();
Expand Down
2 changes: 1 addition & 1 deletion components/navigation/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
defaultLanguage,
languages,
useTranslation,
} from "next-i18next-static-site";
} from "i18n-static-site";

const isMobile = isMobileDevice();
const uniqueLangs = [...new Set(["EN", "DE"])].map((repo) => ({
Expand Down
4 changes: 2 additions & 2 deletions cypress/test/Hero.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ describe('Hero Component', () => {
it('displays the correct content', () => {
mount(<Hero />);

cy.contains('Building the future of');
cy.contains('Event-Driven Architectures (EDA)');
cy.contains('main.header');
cy.contains('main.subHeader');
cy.contains('Open-Source tools to easily build and maintain your event-driven architecture.');
cy.contains('Read the docs');
cy.contains('Quick search...');
Expand Down
2 changes: 1 addition & 1 deletion lib/locales.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { languages, namespaces } from "next-i18next-static-site";
import { languages, namespaces } from "i18n-static-site";

function loadLocales() {
// Load all locales, required for next-i18n-static-site
Expand Down
6 changes: 1 addition & 5 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const gemoji = require('remark-gemoji-to-emoji');
const a11yEmoji = require('@fec/remark-a11y-emoji');
const slug = require('remark-slug');
const headingId = require('remark-heading-id');
const { i18n } = require("./next-i18next-static-site.config");

const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
Expand All @@ -21,7 +20,7 @@ const withMDX = require('@next/mdx')({
},
});

const withTM = require("next-transpile-modules")(["next-i18next-static-site"]);
const withTM = require("next-transpile-modules")(["i18n-static-site"]);

module.exports = withTM(withMDX({
pageExtensions: ['js', 'md'],
Expand All @@ -39,7 +38,4 @@ module.exports = withTM(withMDX({

return config;
},
publicRuntimeConfig: {
i18n,
},
}));
75 changes: 40 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"mermaid": "9.3.0",
"moment": "^2.29.4",
"next": "^12.0.0",
"next-i18next-static-site": "^0.3.1",
"next-mdx-remote": "^4.4.1",
"next-transpile-modules": "^10.0.0",
"node-fetch": "^2.6.7",
Expand All @@ -79,7 +78,6 @@
"react-dom": "^17.0.2",
"react-ga": "^3.1.2",
"react-gtm-module": "^2.0.11",
"react-i18next": "^13.0.1",
"react-scrollspy": "^3.4.2",
"react-syntax-highlighter": "12.2.1",
"react-text-truncate": "^0.16.0",
Expand All @@ -95,7 +93,8 @@
"swiper": "^8.3.2",
"tailwind-merge": "^1.3.0",
"tailwindcss": "^3.1.4",
"yaml": "^2.2.2"
"yaml": "^2.2.2",
"i18n-static-site": "0.3.2"
},
"devDependencies": {
"@cypress/react": "^7.0.3",
Expand Down
2 changes: 1 addition & 1 deletion pages/[lang]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import NewsroomSection from '../../components/newsroom/NewsroomSection';
import {
getAllLanguageSlugs,
getLanguage,
} from "next-i18next-static-site";
} from "i18n-static-site";

function HomePage() {
return (
Expand Down
2 changes: 1 addition & 1 deletion pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
defaultLanguage,
namespaces,
defaultNamespace,
} from "next-i18next-static-site";
} from "i18n-static-site";
import loadLocales from "../lib/locales";
import '../styles/globals.css'

Expand Down
2 changes: 1 addition & 1 deletion pages/casestudies/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import TextLink from '../../components/typography/TextLink';
import Heading from "../../components/typography/Heading";
import CaseStudiesList from "../../config/case-studies.json";
import {
} from "next-i18next-static-site";
} from "i18n-static-site";

export default function casestudies() {
const description =
Expand Down
10 changes: 5 additions & 5 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import GoogleCalendarButton from '../components/buttons/GoogleCalendarButton';
import ICSFileButton from '../components/buttons/ICSFileButton';
import SubscribeButton from '../components/buttons/SubscribeButton';
import NewsroomSection from '../components/newsroom/NewsroomSection'
import { languageDetection } from "next-i18next-static-site";
import { languageDetection } from "i18n-static-site";

function HomePage() {
languageDetection();
Expand Down Expand Up @@ -165,7 +165,7 @@ function HomePage() {
>
Platinum Sponsors
</Heading>
<Sponsors className="mt-4" showSupportBanner={ false } />
<Sponsors className="mt-4" showSupportBanner={false} />
</Container>

<Container className="text-center pb-6" wide as="section">
Expand All @@ -176,7 +176,7 @@ function HomePage() {
>
Gold Sponsors
</Heading>
<GoldSponsors className="mt-4" showSupportBanner={ false } />
<GoldSponsors className="mt-4" showSupportBanner={false} />
</Container>

<Container className="text-center pyb-6" wide as="section">
Expand All @@ -187,7 +187,7 @@ function HomePage() {
>
Silver Sponsors
</Heading>
<SilverSponsors className="mt-4" showSupportBanner={ false } />
<SilverSponsors className="mt-4" showSupportBanner={false} />
</Container>


Expand Down Expand Up @@ -217,7 +217,7 @@ function HomePage() {
Email us
</TextLink> for more info.
</Paragraph>
<SupportUs className="mt-4" showSupportBanner={ false } />
<SupportUs className="mt-4" showSupportBanner={false} />
</Container>
<Container className="text-center pb-20 mt-8" wide as="section">
<Heading level="h3" typeStyle="heading-lg" className="mb-4">
Expand Down

0 comments on commit fd50f76

Please sign in to comment.