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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
.DS_Store
**/.DS_Store

# Node / frontend
node_modules/
**/node_modules/
dist/
**/dist/
.vite/
coverage/
apps/desktop/node_modules/
apps/desktop/dist/

# Rust / Cargo
target/
**/target/

# Tauri generated outputs
apps/desktop/src-tauri/target/
apps/desktop/src-tauri/gen/schemas/
apps/desktop/src-tauri/gen/

# Environment / local settings
.env
Expand Down
13 changes: 12 additions & 1 deletion apps/desktop/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'

export default defineConfig([
globalIgnores(['dist']),
globalIgnores([
'dist',
'node_modules',
'src-tauri/target',
'src-tauri/gen',
]),
{
files: ['**/*.{ts,tsx}'],
extends: [
Expand All @@ -20,4 +25,10 @@ export default defineConfig([
globals: globals.browser,
},
},
{
files: ['src/main.tsx'],
rules: {
'react-refresh/only-export-components': 'off',
},
},
])
10 changes: 5 additions & 5 deletions apps/desktop/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export default function App() {
const m = useAppModel();
const { t } = useContext(LocaleContext);

// (role: schedule view week start (Monday), type: string (YYYY-MM-DD))
const scheduleWeekStartYmd = useMemo(() => {
return toYmd(startOfWeekMonday(m.today));
}, [m.today]);

if (!m.hydrated) {
return (
<div className="flex min-h-screen items-center justify-center bg-zinc-950 text-sm text-zinc-400">
Expand All @@ -37,11 +42,6 @@ export default function App() {
);
}

// (role: schedule view week start (Monday), type: string (YYYY-MM-DD))
const scheduleWeekStartYmd = useMemo(() => {
return toYmd(startOfWeekMonday(m.today));
}, [m.today]);

return (
<div className="min-h-screen bg-zinc-950 text-zinc-100">
<ToastHost durationMs={2000} />
Expand Down
8 changes: 4 additions & 4 deletions apps/desktop/src/features/task/components/TaskForm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useContext, useMemo } from 'react';
import { useForm } from 'react-hook-form';
import { useForm, useWatch } from 'react-hook-form';
import { z } from 'zod';
import { zodResolver } from '@hookform/resolvers/zod';

Expand Down Expand Up @@ -119,9 +119,9 @@ export function TaskForm({ onCreate }: TaskFormProps) {
);

const {
control,
register,
handleSubmit,
watch,
setValue,
reset,
formState: { errors, isSubmitting, isValid },
Expand All @@ -139,8 +139,8 @@ export function TaskForm({ onCreate }: TaskFormProps) {
mode: 'onChange',
});

const category = watch('category');
const customDays = watch('customDays') ?? [];
const category = useWatch({ control, name: 'category' });
const customDays = useWatch({ control, name: 'customDays' }) ?? [];

const canSubmit = useMemo(() => {
if (!isValid) return false;
Expand Down
7 changes: 7 additions & 0 deletions apps/server/Cargo.lock

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

7 changes: 7 additions & 0 deletions crates/frilday-core/Cargo.lock

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

Loading