-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Authentication and Implement Paid Subscription Features
This commit brings several significant changes to the application, primarily aimed at improving the authentication system and introducing a paid subscription model. Key Changes: 1. Integration of `Anyscale` library in `route.ts` for enhanced model management. 2. Removal of 'Share' option from `bot-options/index.tsx`, streamlining the user interface. 3. Refactoring in `chat.tsx` to use `useAuthContext` and `webappUrl` utility, improving code readability and maintainability. 4. Introduction of paid subscription logic in `home.tsx` with a new `usePaidSubscription` hook and `RedirectLoadingPage` component to handle user access based on subscription status. 5. Implementation of `AuthContext` and `AuthProvider` in `home.tsx` to manage authentication state more effectively across the application. 6. Creation of `redirect-loading.tsx` to handle redirection with a loader for subscription verification. 7. Refinement of the `useAuth` hook in `useAuth.ts` to streamline the logout process and error handling, enhancing user experience and code robustness. 8. Addition of `usePaidSubscription` hook in a new file `usePaidSubscription.ts`, establishing the logic to check and manage paid subscriptions. 9. Creation of utility functions in `urls.ts` for generating URLs, promoting code reuse and simplification. These updates aim to enhance the application's functionality, user experience, and code quality. Resolves: [Ticket/Issue Numbers if applicable]
- Loading branch information
1 parent
bcb7a6b
commit 79b609b
Showing
6 changed files
with
544 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.