Files
evidencija-rezija/web-app/app/lib/actions/navigationActions.ts
Knee Cola c7e81a27ee fix: update remaining imports in web-app actions to use shared-code
Fix imports in app/lib/actions/ that were still using relative paths
('../db-types') instead of the shared-code package.

Updated files:
- billActions.ts
- emailActions.ts
- locationActions.ts
- monthActions.ts
- navigationActions.ts
- printActions.ts
- userSettingsActions.ts

All imports now correctly reference @evidencija-rezija/shared-code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 18:42:43 +01:00

24 lines
722 B
TypeScript

'use server';
import { revalidatePath } from "next/cache";
import { redirect } from 'next/navigation';
import { YearMonth } from "@evidencija-rezija/shared-code";
export async function gotoHome({year, month}: YearMonth) {
const path = `/home?year=${year}&month=${month}`;
await gotoUrl(path);
}
export async function gotoHomeWithMessage(locale: string, message: string, yearMonth?: YearMonth) {
const path = yearMonth
? `/${locale}/home?year=${yearMonth.year}&month=${yearMonth.month}&${message}=true`
: `/${locale}/home?${message}=true`;
await gotoUrl(path);
}
export async function gotoUrl(path: string) {
console.log(path)
revalidatePath(path, "page");
redirect(path);
}