Skip to content

Commit

Permalink
feat: creates new playground with next.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethaasan committed Feb 29, 2024
1 parent d63f9ab commit 9f09665
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ npm-debug.log*
lerna-debug.log*
/**/*.tgz
/.github

playground/.next/
1 change: 0 additions & 1 deletion library/src/helpers/specification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export class SpecificationHelpers {
*/
static serversTags(spec: AsyncAPIDocumentInterface) {
const tags: Record<string, string[]> = {};

Object.entries(spec.servers()).forEach(([_, server]) => {
if (server.tags().length > 0) {
server
Expand Down
10 changes: 5 additions & 5 deletions playground/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { Metadata } from 'next';
import { Inter } from 'next/font/google';
import './globals.css';

const inter = Inter({ subsets: ["latin"] });
const inter = Inter({ subsets: ['latin'] });

export const metadata: Metadata = {
title: "AsyncAPI React Playground App",
title: 'AsyncAPI React Playground App',
};

export default function RootLayout({
Expand Down
34 changes: 16 additions & 18 deletions playground/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,21 @@ import {
NavigationHeaderEditorText,
} from './styled';

const NavigationComponent = () => {
return (
<NavigationWrapper>
<NavigationHeader>
<NavigationHeaderH1>
<NavigationHeaderIcon
src="https://avatars0.githubusercontent.com/u/16401334?v=4&s=200"
alt="AsyncAPI logo"
/>
<NavigationHeaderAsyncApiText>
AsyncAPI React
</NavigationHeaderAsyncApiText>
<NavigationHeaderEditorText>editor</NavigationHeaderEditorText>
</NavigationHeaderH1>
</NavigationHeader>
</NavigationWrapper>
);
};
const NavigationComponent = () => (
<NavigationWrapper>
<NavigationHeader>
<NavigationHeaderH1>
<NavigationHeaderIcon
src="https://avatars0.githubusercontent.com/u/16401334?v=4&s=200"
alt="AsyncAPI logo"
/>
<NavigationHeaderAsyncApiText>
AsyncAPI React
</NavigationHeaderAsyncApiText>
<NavigationHeaderEditorText>editor</NavigationHeaderEditorText>
</NavigationHeaderH1>
</NavigationHeader>
</NavigationWrapper>
);

export default NavigationComponent;
8 changes: 4 additions & 4 deletions playground/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Config } from "tailwindcss";
import { Config } from 'tailwindcss';

const config: Config = {
content: [
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {},
Expand Down

0 comments on commit 9f09665

Please sign in to comment.