Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
huxulm committed Dec 20, 2024
1 parent 4efb2a7 commit e1f96a1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 32 deletions.
2 changes: 1 addition & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
output: "export",
basePath: "/k8s",
basePath: "/k8s-simulator",
distDir: "build",
};

Expand Down
5 changes: 3 additions & 2 deletions src/app/cka/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export default function CKA() {
const questions = cka.questions["1.31"] as Record<string, string>;
const seqs = Object.keys(questions);
const contents = useMemo(() => {
return seqs.map((seq) => {
return seqs.map((seq, i) => {
const question = questions[seq];
return (
<div>
<div key={`c_${i}`}>
<h1 className="text-xl font-bold">{`Question ${seq}`}</h1>
<p>
<ReactMarkdown className="markdown">{question}</ReactMarkdown>
Expand Down Expand Up @@ -51,6 +51,7 @@ export default function CKA() {
<ul>
{seqs.map((seq, index) => (
<li
key={`menu_${index}`}
className="side-item"
onClick={() => setCurrent(contents[index])}
>{`Question ${seq}`}</li>
Expand Down
19 changes: 6 additions & 13 deletions src/app/cks/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export default function CKS() {
const questions = cks.questions["1.31"] as Record<string, string>;
const seqs = Object.keys(questions);
const contents = useMemo(() => {
return seqs.map((seq) => {
return seqs.map((seq, i) => {
const question = questions[seq];
return (
<div>
<div key={`c_${i}`}>
<h1 className="text-xl font-bold">{`Question ${seq}`}</h1>
<p>
<ReactMarkdown className="markdown">{question}</ReactMarkdown>
Expand All @@ -28,18 +28,10 @@ export default function CKS() {
<nav className="top-nav">
<ul className="nav-list">
<a className="nav-logo" href="/cka">
<img
src="/k8s/cka.svg"
alt="Next.js logo"
className="w-full h-full"
/>
<img src="/k8s/cka.svg" className="w-full h-full" />
</a>
<a className="nav-logo" href="/cka">
<img
src="/k8s/cka.svg"
alt="Next.js logo"
className="w-full h-full"
/>
<a className="nav-logo" href="/cks">
<img src="/k8s/cks.svg" className="w-full h-full" />
</a>
<h3 className="text-blue-600 text-xl font-bold">
Certified Kubernetes Security Specialist (CKS)
Expand All @@ -51,6 +43,7 @@ export default function CKS() {
<ul>
{seqs.map((seq, index) => (
<li
key={`menu_${index}`}
className="side-item"
onClick={() => setCurrent(contents[index])}
>{`Question ${seq}`}</li>
Expand Down
17 changes: 1 addition & 16 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";

const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});

const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});

export const metadata: Metadata = {
title: "K8s Simulator Q&A",
description: "Generated by create next app",
Expand All @@ -24,11 +13,7 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
</body>
<body className={`antialiased`}>{children}</body>
</html>
);
}

0 comments on commit e1f96a1

Please sign in to comment.