Update billing navigation and increase test timeout

Changes include updating the user and team billing specs to increase visibility timeout and alter navigation route post-billing. Minor adjustments have been made to the page aesthetics and redirection logic. Also, refactored import statements for code organization purposes. Changes in the build script are also reflected in the commit.
This commit is contained in:
giancarlo
2024-04-15 12:40:27 +08:00
parent 4e305bf8c9
commit a3fc153207
9 changed files with 35 additions and 29 deletions

View File

@@ -1,5 +1,5 @@
// We reuse the page from the billing module
// as there is no need to create a new one.
import ReturnCheckoutSessionPage from '../../../[account]/billing/return/page';
import ReturnCheckoutSessionPage from '~/(dashboard)/home/[account]/billing/return/page';
export default ReturnCheckoutSessionPage;

View File

@@ -95,6 +95,10 @@ async function loadCheckoutSession(sessionId: string) {
};
}
/**
* Revalidates the layout to update cached pages
* and redirects back to the home page.
*/
// eslint-disable-next-line @typescript-eslint/require-await
async function onRedirect() {
'use server';
@@ -103,6 +107,6 @@ async function onRedirect() {
// which may have changed due to the billing session
revalidatePath('/home', 'layout');
// redirect back
redirect('../');
// redirect back to billing page
redirect('../billing');
}