This commit relocates the 'general.interface.ts' file from the 'services' directory to the 'interfaces' directory. This structural change is meant to streamline the organization of the code base.
The Toaster component was relocated in the layout file. It's been moved from below the Providers component to a position above the Footer component. This repositioning is aimed at improving the visual hierarchy and flow of the application.
The footer's class has been updated to improve page layout. Additionally, unnecessary div containing flex properties has been removed for simplicity and improved readability.
The commit enhances the account information component with better data handling. It adds disconnect handling to account for cases when user session is terminated. It also improves information display by adding details like crypto availability and user identity, improving the overall user experience.
This commit introduces a new interface file named 'general.interface.ts' to standardise return types in the services scope. It includes the IStandardisedReturn interface and the EReturnState enum. These additions enhance the consistency of return types across different services.
This commit introduces authentication forms for both user login and registration. These forms use zod for data validation and context for state management. Login and registration processes have been implemented as asynchronous functions, handling API requests, and error responses.
This commit updates the account-dialog component to properly handle when there's no userContext. Previously, a default user data was set when no userContext was found, this has been replaced with a simple message saying 'No account'. Also, checks for an authentication token in localStorage have been included. These changes aim towards better handling of edge cases and unauthenticated scenarios.
The width of the authentication page is adjusted to occupy the full width of the viewport to enhance usability. This layout update ensures consistency for different screen sizes.
This commit involves a significant refactoring in the account.handler.ts file. Specifically, it removed the `doRegister` and `doLogin` functions. Furthermore, replaced `useEncodedLocalStorage` with `useLocalStorage`. The `doDisconnect` function has been refined to redirect to homepage after removing an item from local storage.
In the 'input.tsx' component of the UI, the background color property of the input field has been updated from 'bg-background' to 'bg-accent' to enhance visibility.
The className of the form in the auto-form component has been updated to include "w-full". This change ensures that the form will occupy the full width of its parent container, enhancing layout and visibility.
This update to the api.interface now accepts both strings and arrays for the 'message' field inside the IAbstractApiResponse interface. This provides more flexibility for responses returned by the API.
This commit enhances the layout in header.tsx for better mobile responsiveness. It adjusts flex properties and classes for optimal rendering across various device sizes. It also rearranges elements within the header component for a better mobile appearance.
This change adjusts the import statement to correctly import the ICryptoInUserWalletInfo. Previously, the incorrect syntax was causing import errors and this revision resolves that issue.
A new authentication page has been added to the application. It includes an AuthForms component and uses a flex display for layout, with specific height and width properties set.
The change adds Wallet related properties in both User and Crypto interfaces. Specifically, `IUserWallet` interface has been added to `userdata.interface.ts` and 'amount' field has been added to `IUserWalletCryptos` in `crypto.interface.ts`. Also, an extra type `ICryptoInUserWalletInfo` extending `ICryptoInWalletInfo` has been added with `owned_amount` field.
This commit introduces a new CopyButton component in the ui components. It also includes a feature to copy multiple choices. The button changes its icon after copying to clipboard, indicating that the copying has been done.
The update enhances the account dialog component by introducing loading state management and improved context handling. Instead of displaying "Loading..." while user data is being fetched, a Skeleton component is now rendered. Additionally, detailed user data fields are now provided when setting the user data context. An effect hook supplies the proper loading state management.
The update enhances the account dialog component by introducing loading state management and improved context handling. Instead of displaying "Loading..." while user data is being fetched, a Skeleton component is now rendered. Additionally, detailed user data fields are now provided when setting the user data context. An effect hook supplies the proper loading state management.
Updated the classes in the Header component to enhance layout presentation. Particularly, added padding at the bottom and updated the alignment for better responsiveness. This will enhance user interface on multiple device dimensions.
A new DatePicker component has been added to the UI components directory. This component includes a dropdown calendar for a user-friendly date selector. It utilizes a popover triggered by a button for seamless date selection and integration.
Added several files to the AutoForm component for better form functionality including a file for each type of input field (checkbox, date, enum, file, number, radio-group, switch, etc). Managed the configurations in a separate file and handled dependencies to control form behaviours. This commit enhances form handling capabilities and simplifies the process for creating versatile forms.
The 'Sheet' UI component in 'account-info' component is replaced with a 'Dialog'. This commit also upgrades userData delivery, and includes interactivity enhancements like added wallet and disconnect buttons. The user's first name is presented in the dialog header.
This commit includes two additional interfaces for handling user assets and trades. The `IApiUserAssetsRes` interface provides a way to store and manage the user assets response from the API. The `IApiAllTrades` interface has been introduced for dealing with all trades data. Necessary imports are also added in the file.
This commit adds the crypto interface file to the src/interfaces directory. The file includes the IUserWalletCryptos, ICryptoInWalletInfo, IAllTrades, ITrade, ISellerIdentity, IBuyerIdentity, and ITradedCrypto interfaces, defining the structure and data types for the user wallet cryptos, all trades, and traded crypto.
The updated code refactors the `localStorage.ts` service. The refactoring introduces typescript syntax on the import statement, adds a safer use of localStorage when window is undefined, and enhances readability of the code by modifying the function signature to multiple lines. Additionally, it removes unnecessary lines for cleaner code structure.
Rearranged import orders for better visibility and readability. Also, cleaned up some of the typescript and JSX by adding appropriate line breaks and spaces, and ensuring the use of semicolons for better punctuation.
The login and registration functionality have been implemented using the new `IApiLoginReq`, `IApiLoginRes`, `IApiRegisterReq`, `IApiRegisterRes` interfaces. These include error handling and data storing in local storage.
The changes replace the "name" property references with "firstName" in the account-info component. The user interface buttons' labels and input field placeholders now utilize "firstName" for user data. This adjustment provides clearer and more accurate data presentation to the users.
This commit updates the baseUrl value in the apiRequest service. It now uses the API_URL from the environment variables, or defaults to "http://localhost:3333" if the environment variable is not set.
Updated the apiRequest module with refinements in authorization and removal of redundant comments. The changes allow handling server-side rendering and type enforcement in request body.
Created new typescript interfaces for API. They include IApiRegisterReq, IApiLoginReq, IAbstractApiResponse, IApiRegisterRes, and IApiLoginRes. These interfaces will be used to properly structure the data for API requests and responses, thus enhancing type safety and maintainability.
This commit enriches the IUserData interface by adding a series of new properties for a more comprehensive representation of a user. These additional properties include id, firstName, lastName, pseudo, email, roleId, isActive, city, dollarAvailables, age, created_at, and updated_at.
This commit includes the creation of new react components and fields for auto-form functionality. The components include AutoFormLabel, AutoFormTooltip, and specific field components for data types such as AutoFormObject, AutoFormArray, AutoFormDate, AutoFormCheckbox, and others. Added tests to ensure the correct rendering of fields, labels generation, among other behaviors.
The default value in the UserDataContext has been updated. Previously, it was set to false and now it has been changed to an object with the name property set to "Avnyr".
This commit introduces user data management with the addition of new interfaces and services. User data interface which defines the structure of user data was created. Account handler service for registering, logging in, updating user data and disconnecting was also added. User data provider component was created for managing user data state. The account info component for displaying and editing the user account was introduced too. Finally, updates were made in the existing components and services for accommodating these new elements.
The structure of the main component in page.tsx has been adjusted to better accommodate its content. The div styling has been updated from full width with padding to half-width, full height, and content justified to the end.
This commit introduces a batch of UI components such as Accordion, Alert, Avatar, Badge, etc. Each component is provided with proper TypeScript type definitions. Reusable styling is catered for many of these using the `cn` utility for applying styles. Integration with `@radix-ui/react-*` libraries is also evident in some components for advanced and flexible functionality.
The commit includes a new layout component that contains the basic structure of the application, including Header, Footer, and ThemeProvider. Also, a new Home page component has been created including a basic "Hello World" greeting.
Introduced two new components: Footer and Header. The Footer includes copyright and navigation links, while the Header contains the site's logo, title, and a theme selector.
This commit introduces a new component, PrimaryNavigationMenu, to the components directory. This component is responsible for rendering the main navigation menu of the application. It also includes the logic for mapping and displaying a list of features in the menu.
This commit introduces a `ThemeProvider` component and a `ThemeBtnSelector` component. The `ThemeProvider` component applies the current theme to all its children. The `ThemeBtnSelector` component provides a dropdown menu that allows users to select a theme ("light", "dark", or "system").
This commit introduces a new file 'globals.css' to manage our application-wide styles. The imported Tailwind CSS utility classes have been applied and custom CSS variables for both light and dark themes have been defined. It also includes styling for some components like the body and borders for a more consistent look and feel throughout the application.
A new utility function `cn` has been added to `utils.ts` for the purpose of class merging. This function uses "clsx" and "tailwind-merge" to merge class values, simplifying and optimizing the process of multiple class joining in our project.
Created a new service, localStorage.ts to handle localStorage operations in React, introducing two new custom hooks, useLocalStorage and useEncodedLocalStorage. These hooks provide functionalities to store, retrieve, and update data in the browser's localStorage.
This commit introduces the new 'apiRequest' service file. This service file contains functionalities for standard and authenticated network requests including POST, GET, PATCH, and DELETE actions using axios. The file has been structured to easily perform network requests with necessary headers and status validations.