Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,35 @@ env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}

jobs:
lint:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: ./tooling/github/setup

- name: Copy env
shell: bash
run: cp .env.example .env
- name: Check (lint and format)
run: pnpm check

- name: Lint
run: pnpm lint && pnpm lint:ws

format:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: ./tooling/github/setup

- name: Format
run: pnpm format
- name: Typecheck
run: pnpm typecheck

typecheck:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: ./tooling/github/setup

- name: Typecheck
run: pnpm typecheck
- name: Build
run: pnpm build
2 changes: 1 addition & 1 deletion apps/localtunnel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"check": "biome check",
"clean": "git clean -xdf .cache .next .turbo node_modules tsconfig.tsbuildinfo",
"dev": "pnpm with-env concurrently \"pnpm watch\" \"pnpm tunnel\"",
"dev": "NODE_ENV=development pnpm with-env concurrently \"pnpm watch\" \"pnpm tunnel\"",
"tunnel": "pnpm with-env sh -c 'pnpm lt --port $LOCALTUNNEL_PORT --subdomain $LOCALTUNNEL_SUBDOMAIN'",
"typecheck": "tsc --noEmit",
"watch": "pnpm with-env tsx watch ./src/main.ts",
Expand Down
6 changes: 3 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"private": true,
"type": "module",
"scripts": {
"build": "pnpm with-env next build",
"build": "NODE_ENV=production pnpm with-env next build",
"check": "biome check",
"clean": "git clean -xdf .cache .next .turbo node_modules",
"dev": "pnpm with-env next dev --turbopack",
"dev": "NODE_ENV=development pnpm with-env next dev --turbopack",
"shadcn": "pnpm dlx shadcn@latest add && pnpm check --write --unsafe",
"start": "pnpm with-env next start",
"start": "NODE_ENV=production pnpm with-env next start",
"typecheck": "tsc --noEmit",
"with-env": "dotenv -e ../../.env --"
},
Expand Down
8 changes: 8 additions & 0 deletions apps/web/src/app/_components/not-found-editor.dynamic.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import dynamic from "next/dynamic";

export const DynamicNotFoundEditor = dynamic(
() => import("./not-found-editor").then((mod) => mod.NotFoundEditor),
{
ssr: false,
},
);
44 changes: 44 additions & 0 deletions apps/web/src/app/_components/not-found-editor.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"use client";

import { BlockNoteView } from "@blocknote/mantine";
import { useCreateBlockNote } from "@blocknote/react";

export function NotFoundEditor() {
// Creates a new editor instance.
const editor = useCreateBlockNote({
initialContent: [
{
content: "Journl #404",
type: "heading",
},
{
content: "Page not found.",
type: "paragraph",
},
{
content: "The path was linked, but the note was not.",
type: "bulletListItem",
},
{
content: "Will investigate later... or probably forget.",
type: "bulletListItem",
},
{
children: [
{
content: "window.location.href = '/';",
props: { language: "json" },
type: "codeBlock",
},
],
content: "This should help users find their way back...",
type: "bulletListItem",
},
{
type: "paragraph",
},
],
});

return <BlockNoteView autoFocus theme="light" editor={editor} />;
}
Loading