71 Commits

Author SHA1 Message Date
1898d554f9
feat(interfaces): add new API interfaces and update existing ones
New interfaces were added to enhance functionality for trade and offer creation requests. Renamed IApiAllTrades interface to IApiAllTradesRes for consistency. Interfaces were also added to manage referral codes and rankings.
2024-06-18 21:22:49 +02:00
50225f1c17
feat(account-info): import and use getWallet from account handler
The 'getWallet' function has been imported from the account handler service and is now used in account-info component. This addition ensures to fetch information when the component renders.
2024-06-18 21:22:34 +02:00
00be94c5a8
feat(account.handler): add new API methods
This commit adds several new async functions to fetch wallet, user trades and all trades in `account.handler.ts`. This provides an interface for interacting with multiple new endpoints. Additionally, several import statements have been updated to reflect the changes.
2024-06-18 21:22:12 +02:00
faba9fa3cb
refactor(layout): rearrange import order
The import statements in layout.tsx have been reordered. React type import is now following Toaster component import to maintain organized import sequence.
2024-06-18 16:36:56 +02:00
397bef5cdf
refactor: move general interface to interfaces directory
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.
2024-06-18 16:35:46 +02:00
11b4c723fa
chore(dependencies): upgrade packages in pnpm-lock.yaml
Several dependencies have been upgraded across multiple versions including react-hook-form, lightweight-charts, next elements, sonner, lucide-react, embla-carousel-react and others. Reflecting these changes in the pnpm-lock.yaml file is necessary for functional and up-to-date building of the project. This helps maintain compatibility and introduces performance improvements or new features from the updated packages.
2024-06-17 10:02:36 +02:00
1674664980
build: Update package dependencies
Upgrade multiple dependencies to their newer versions in package.json file. This includes libraries like 'embla-carousel-react', 'lightweight-charts', and 'react' among others. It also includes devDependencies like '@types/node', '@types/react', and 'typescript'.
2024-06-17 10:02:09 +02:00
39fc556aca
refactor(app): move Toaster component position in layout
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.
2024-06-17 10:01:32 +02:00
7426f5f642
feat(component): Update footer styling and structure
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.
2024-06-17 10:01:15 +02:00
01c073e879
feat(account-info): add disconnect handling and improve info display
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.
2024-06-17 09:50:06 +02:00
e6d37ef600
feat(services): add general.interface.ts
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.
2024-06-17 09:49:09 +02:00
cc286462f0
feat(components): add authentication forms
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.
2024-06-17 09:48:38 +02:00
4c061dc19c
feat(account-dialog): handle case when userContext not present
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.
2024-06-17 09:47:57 +02:00
3b1a3e93e0
feat(layout): add Toaster component and update favicon link
This commit introduces the Toaster component to the main layout. In addition, the link to the favicon has been updated to correct its location.
2024-06-17 09:46:21 +02:00
5c81ad917d
feat(auth): Update auth page layout
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.
2024-06-17 09:45:58 +02:00
b5526e5877
"refactor(service): remove register and login functions in account.handler.ts"
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.
2024-06-17 09:45:25 +02:00
41ba50d417
feat(ui): Change input background color to accent
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.
2024-06-17 09:44:47 +02:00
0504692dfb
feat(auto-form): apply full width to form class
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.
2024-06-17 09:44:07 +02:00
15eb7addd0
feat(interface): allow message to be string or array
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.
2024-06-17 09:43:26 +02:00
5a905d0608
refactor: moved favicon to app root 2024-06-17 09:35:31 +02:00
72bbe08de0
feat(components): update layout for responsiveness
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.
2024-06-14 12:48:03 +02:00
48adc8be6c
refactor(interface): modify import statement in userdata.interface.ts
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.
2024-06-14 12:47:41 +02:00
3a8621735e
feat(auth): Add new authentication page
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.
2024-06-14 12:47:17 +02:00
0ead6bd969
refactor(interfaces): add Wallet related properties in User and Crypto interfaces
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.
2024-06-14 10:08:44 +02:00
747cc1cdb4
feat(ui-component): add new copy button component
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.
2024-06-14 10:07:58 +02:00
a873095099
feat(component): Add loading and context handling
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.
2024-06-12 16:54:18 +02:00
600692e3e5
feat(component): Add loading and context handling
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.
2024-06-12 15:13:23 +02:00
efb6eaf274
feat(component): modify CSS classes for improved layout
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.
2024-06-12 15:00:33 +02:00
b3907697a0
feat(ui): add DatePicker component
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.
2024-06-12 15:00:05 +02:00
c51e4fcc77
feat(auto-form): add new fields and form files to AutoForm component
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.
2024-06-12 14:59:35 +02:00
6976e3a317
feat(component): replace Sheet with Dialog, enhance user interaction
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.
2024-06-12 14:58:25 +02:00
24c168bc44
feat(interface): add new interfaces for user assets and trades
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.
2024-06-12 14:50:50 +02:00
f3fd897a3f
feat(interfaces): Add crypto interface
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.
2024-06-12 14:50:28 +02:00
3dfee64e8e
feat: Add new biome.json configuration file
This commit introduces a new biome.json file which contains configuration for organizing imports, included files, version control, linter rules and formatting parameters. It's intended to optimize code quality checks and make the codebase more maintainable.
2024-06-12 09:49:28 +02:00
dea98f41a9
feat: add '@biomejs/biome' as a devDependency
This commit introduces '@biomejs/biome' version 1.8.1 as a devDependency in the pnpm-lock.yaml file. This also includes additions of '@biomejs' related CLI tools for various platforms (darwin, linux, win32) with different architectures (x64, arm64) as optional dependencies, providing support for multiple environments.
2024-06-12 09:48:56 +02:00
cfa18733b4
feat(package): add biome check script and biome devDependency
This commit adds a new "check" script in the package.json that uses Biome for checking our codebase. It also includes Biome as a new development dependency to facilitate the use of the check script.
2024-06-12 09:48:28 +02:00
a7899d8a4a
feat(services): refactor localStorage service
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.
2024-06-12 09:47:56 +02:00
1c42b6a4b6
feat: Improve code formatting and import order
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.
2024-06-12 09:47:17 +02:00
4d00d4b936
feat(handler): add login, registration functionality
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.
2024-06-11 16:59:02 +02:00
2c333d9c00
feat(component): update user data references from name to firstName
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.
2024-06-11 16:58:43 +02:00
697dcbf4b8
feat(services): update baseUrl in apiRequest
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.
2024-06-11 16:55:45 +02:00
278cf844c2
feat(services): update apiRequest module
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.
2024-06-11 16:08:57 +02:00
e9048ca7eb
feat(interfaces): add API request/response interfaces
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.
2024-06-11 16:08:34 +02:00
950cb9137f
feat(interface): extend IUserData properties
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.
2024-06-11 16:07:59 +02:00
882729ffc9
Revert "feat: Implement new auto-form components and fields"
This reverts commit dc17e4a8f755ce045b461858ffcd56f567c5658f.
2024-06-10 11:58:40 +02:00
dfa443d373
feat: update and remove specific dependencies
Details:
This update makes three major changes in dependency tree. Firstly, packages '@react-three/drei', '@react-three/fiber', 'three', 'three-globe', '@types/three', '@types/jest' and 'jest' have been removed. Secondly, the '@babel/core' package has been added as a new dependency. Thirdly, version of the 'next' package has been updated. Please review compatibility before upgrading.
2024-06-10 11:54:25 +02:00
dc17e4a8f7
feat: Implement new auto-form components and fields
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.
2024-06-10 11:51:23 +02:00
036acfce23
feat(services): update default value in UserDataContext
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".
2024-06-10 11:50:05 +02:00
606f37e78f
feat: Add new packages to pnpm-lock
This commit consists of adding new packages to the `pnpm-lock.yaml` file. Packages include '@radix-ui/react-navigation-menu', '@react-three/drei', 'lightweight-charts', 'three', 'three-globe', '@types/three', among others. Also, it includes the addition of new package versions and their integrity hashes. Verify the diff for full changes.
2024-06-10 11:35:54 +02:00
1dd0384857
feat(components, services): Add user data management and account handling
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.
2024-06-07 16:57:37 +02:00