chore: clean up

This commit is contained in:
2024-03-16 18:45:54 +07:00
parent 46cc01e0ee
commit c8e014f33e
67 changed files with 163 additions and 2723 deletions

View File

@@ -29,10 +29,10 @@
"react-currency-input-field": "^3.8.0",
"react-dom": "^18.2.0",
"react-i18next": "^14.1.0",
"slate": "^0.101.5",
"slate-react": "^0.101.6",
"slate": "^0.102.0",
"slate-react": "^0.102.0",
"sonner": "^1.4.3",
"virtua": "^0.27.5"
"virtua": "^0.29.0"
},
"devDependencies": {
"@lume/tailwindcss": "workspace:^",

View File

@@ -0,0 +1,50 @@
import { LoaderIcon } from "@lume/icons";
import { Column } from "@lume/ui";
import { createFileRoute } from "@tanstack/react-router";
import { useState } from "react";
export const Route = createFileRoute("/$account/home")({
component: Screen,
pendingComponent: Pending,
loader: async () => {
const columns = [
{ name: "Tauri v2", content: "https://beta.tauri.app" },
{ name: "Tauri v1", content: "https://tauri.app" },
{ name: "Lume", content: "https://lume.nu" },
{ name: "Snort", content: "https://snort.social" },
];
return columns;
},
});
function Screen() {
const data = Route.useLoaderData();
const [isScroll, setIsScroll] = useState(false);
return (
<div className="relative h-full w-full">
<div
onScroll={() => setIsScroll((state) => !state)}
className="flex h-full w-full flex-nowrap gap-3 overflow-x-auto px-3 pb-3 pt-1.5 focus:outline-none"
>
{data.map((column, index) => (
<Column
key={column.name + index}
column={column}
isScroll={isScroll}
/>
))}
</div>
</div>
);
}
function Pending() {
return (
<div className="flex h-full w-full items-center justify-center">
<button type="button" disabled>
<LoaderIcon className="size-5 animate-spin" />
</button>
</div>
);
}

View File

@@ -1,36 +0,0 @@
import { LumeColumn } from "@lume/types";
import { Column } from "@lume/ui";
import { createLazyFileRoute } from "@tanstack/react-router";
import { useState } from "react";
const DEFAULT_COLUMNS: LumeColumn[] = [
{ name: "Tauri v2", content: "https://beta.tauri.app" },
{ name: "Tauri v1", content: "https://tauri.app" },
{ name: "Lume", content: "https://lume.nu" },
{ name: "Snort", content: "https://snort.social" },
];
export const Route = createLazyFileRoute("/$account/home")({
component: Screen,
});
function Screen() {
const [isScroll, setIsScroll] = useState(false);
return (
<div className="relative h-full w-full">
<div
onScroll={() => setIsScroll((state) => !state)}
className="flex h-full w-full flex-nowrap gap-3 overflow-x-auto px-3 pb-3 pt-1.5 focus:outline-none"
>
{DEFAULT_COLUMNS.map((column, index) => (
<Column
key={column.name + index}
column={column}
isScroll={isScroll}
/>
))}
</div>
</div>
);
}

View File

@@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.4.1",
"@astrojs/check": "^0.5.9",
"@astrojs/tailwind": "^5.1.0",
"@fontsource/geist-mono": "^5.0.2",
"astro": "^4.5.5",