Skip to content

Commit

Permalink
feat: parse taskwarrior JSON data
Browse files Browse the repository at this point in the history
  • Loading branch information
eug-vs committed Jan 14, 2024
1 parent 1743ea1 commit 66ced7f
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 142 deletions.
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@
"lint": "next lint"
},
"dependencies": {
"lodash": "^4.17.21",
"next": "14.0.4",
"react": "^18",
"react-dom": "^18",
"next": "14.0.4"
"zod": "^3.22.4"
},
"devDependencies": {
"typescript": "^5",
"@types/lodash": "^4.14.202",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.0.4",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"eslint": "^8",
"eslint-config-next": "14.0.4"
"typescript": "^5"
}
}
21 changes: 21 additions & 0 deletions pnpm-lock.yaml

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

3 changes: 3 additions & 0 deletions src/app/form.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"use client";

export default function Form() {}
24 changes: 0 additions & 24 deletions src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;
}

@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;
}
}

body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
}
38 changes: 28 additions & 10 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,40 @@
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'
import type { Metadata } from "next";
import { redirect } from "next/navigation";
import { Inter } from "next/font/google";
import "./globals.css";

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

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
title: "NextWarrior",
description: "Feature tracker app built on top of taskwarrior",
};

export default function RootLayout({
children,
}: {
children: React.ReactNode
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
<body className={`${inter.className} min-h-screen`}>
<header className="p-8 border-b">
<form
action={async (formData) => {
"use server";
const cmd = formData.get("cmd")?.toString();
if (!cmd) throw new Error("Wtf");
return redirect(`?${new URLSearchParams({ cmd }).toString()}`);
}}
>
<fieldset className="flex flex-col">
<label htmlFor="cmd">Command</label>
<input id="cmd" className="ring-2 p-2" type="text" name="cmd" />
</fieldset>
</form>
</header>
{children}
</body>
</html>
)
);
}
Loading

0 comments on commit 66ced7f

Please sign in to comment.