Implement redirect with toast notification on profile save
- Add gotoHomeWithMessage function to navigationActions - Redirect to home page after successful profile save - Display success message in toast notification instead of in-form - Check for profileSaved URL parameter on home page mount - Clean up URL parameter after showing toast - Move success message translation to home-page section - Remove unused success state and message from AccountForm - Remove useEffect import from AccountForm User experience: After saving profile, users are redirected to the familiar home screen and see a toast notification confirming the save. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,11 @@ export async function gotoHome({year, month}: YearMonth) {
|
||||
await gotoUrl(path);
|
||||
}
|
||||
|
||||
export async function gotoHomeWithMessage(locale: string, message: string) {
|
||||
const path = `/${locale}?${message}=true`;
|
||||
await gotoUrl(path);
|
||||
}
|
||||
|
||||
export async function gotoUrl(path: string) {
|
||||
console.log(path)
|
||||
revalidatePath(path, "page");
|
||||
|
||||
Reference in New Issue
Block a user