Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shayan/feq 2336/redirect guest users to login page #111

Merged
merged 8 commits into from
Jun 11, 2024
Merged

Shayan/feq 2336/redirect guest users to login page #111

merged 8 commits into from
Jun 11, 2024

Conversation

shayan-deriv
Copy link
Contributor

No description provided.

Comment on lines -84 to 94
as: 'button',
href: 'https://app.deriv.com/appstore/traders-hub',
as: 'a',
href: 'https://app.deriv.com/appstore/reports',
icon: <ReportsLogo iconSize='xs' />,
label: 'Reports',
},
{
as: 'button',
href: 'https://app.deriv.com/appstore/traders-hub',
as: 'a',
href: 'https://app.deriv.com/appstore/cashier',
icon: <CashierLogo iconSize='xs' />,
label: 'Cashier',
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not in this PR's scope but I just fixed it here

Copy link

Preview Link: https://shayan-feq-2336-redi.p2p-standalone.pages.dev

Name Result
Build status Completed ✅
Preview URL Visit Preview
Action URL Visit Action

@@ -12,7 +12,7 @@ const useIsAdvertiser = (): boolean => {
const [isAdvertiser, setIsAdvertiser] = useState(!error && !isEmptyObject(data));

useEffect(() => {
if (error && error?.error.code === ERROR_CODES.ADVERTISER_NOT_FOUND) {
if (error && error?.code === ERROR_CODES.ADVERTISER_NOT_FOUND) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is due to error message structure change in api-hooks library

@@ -80,7 +80,7 @@ const OrderDetails = () => {
if (isLoading || (!orderInfo && !error)) return <Loader isFullScreen />;

// TODO: replace with proper error screen once design is ready
if (error) return <Text>{error?.error?.message}</Text>;
if (error) return <Text>{error?.message}</Text>;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is due to error message structure change in api-hooks library

@@ -225,7 +225,7 @@ describe('<OrderDetails />', () => {
(mockUseGet as jest.Mock).mockReturnValue({
...mockUseGet(),
data: {},
error: { error: { message: 'error message' } },
error: { code: 'code', message: 'error message' },
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is due to error message structure change in api-hooks library


type TContextValue = {
error: TSocketError<'p2p_advertiser_info'> | undefined;
error: { code: string; message: string } | undefined;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is due to error message structure change in api-hooks library

@coveralls
Copy link

coveralls commented Jun 11, 2024

Pull Request Test Coverage Report for Build 9461576364

Details

  • 18 of 28 (64.29%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 74.882%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/hooks/custom-hooks/useRedirectToOauth.ts 6 16 37.5%
Files with Coverage Reduction New Missed Lines %
src/hooks/custom-hooks/useIsAdvertiser.ts 1 91.67%
Totals Coverage Status
Change from base Build 9459882229: -0.2%
Covered Lines: 4483
Relevant Lines: 5413

💛 - Coveralls

@matin-deriv matin-deriv merged commit bead075 into deriv-com:master Jun 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants