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

feat(web): extra statistic on homepage #1671

Merged
merged 27 commits into from
Oct 7, 2024

Conversation

nikhilverma360
Copy link
Contributor

@nikhilverma360 nikhilverma360 commented Aug 7, 2024

(kemuru writing)

closes #683


PR-Codex overview

This PR focuses on enhancing the functionality and structure of the application, particularly in the areas of querying and displaying court statistics, improving component styling, and updating the schema for handling disputes and juror data.

Detailed summary

  • Added ESNext.Array to tsconfig.json.
  • Modified GraphQL queries for courts to include new fields.
  • Updated CourtOverview to include ExtraStats component.
  • Introduced useHomePageExtraStats for fetching additional statistics.
  • Enhanced Court entity with numberVotes and effectiveStake.
  • Added updateEffectiveStake function to calculate total stake.
  • Improved styling in various components for better layout.
  • Updated SVG icons for visual enhancements.
  • Adjusted DisputeCardView to use a new skeleton component for loading states.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced a new ExtraStats component for displaying additional statistics related to court activity over customizable time frames.
    • Implemented custom hooks for fetching homepage statistics and retrieving blockchain data based on timestamps.
    • Added a new ExtraStatsDisplay component for structured display of additional statistics.
  • Bug Fixes

    • Improved data retrieval with enhanced GraphQL queries, including additional fields for more detailed information.
  • Documentation

    • Updated documentation to reflect new components and hooks for better user guidance.
  • Chores

    • Updated environment configuration to transition from development to test endpoints for improved data sourcing.
    • Updated the version number of the subgraph package for better version management.
    • Enhanced TypeScript configuration to include the latest ECMAScript Array features.

@nikhilverma360 nikhilverma360 self-assigned this Aug 7, 2024
Copy link
Contributor

coderabbitai bot commented Aug 7, 2024

Walkthrough

The recent changes introduce several components and hooks that enhance the home page by providing additional statistics related to court activities. Key additions include the ExtraStatsDisplay component for displaying metrics, the useHomePageExtraStats hook for calculating relevant statistics, and the useHomePageBlockQuery hook for fetching court-related data. Additionally, a new ExtraStats component has been implemented to present these statistics in a structured format, contributing to a more informative user experience.

Changes

Files Change Summary
web/src/components/ExtraStatsDisplay.tsx, web/src/pages/Home/CourtOverview/ExtraStats.tsx, web/src/hooks/queries/useHomePageExtraStats.ts, web/src/hooks/queries/useHomePageBlockQuery.ts New components and hooks for displaying and calculating extra statistics related to court activities.
subgraph/core/src/entities/Court.ts Added functions for updating effective stakes and tracking votes in court entities.
web/tsconfig.json Updated TypeScript configuration to include the latest ECMAScript Array features.

Assessment against linked issues

Objective Addressed Explanation
Extra statistics on the Home page (#683)

Possibly related issues

Poem

🐰 In the meadow where data blooms,
Extra stats chase away the glooms.
With hooks and cards, we hop and play,
Insights brightening up the day!
Through courts of numbers, we take our flight,
Hopping along, everything feels right! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Aug 7, 2024

Deploy Preview for kleros-v2-testnet ready!

Name Link
🔨 Latest commit 94c4074
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2-testnet/deploys/6700080b6f08ef000821dffd
😎 Deploy Preview https://deploy-preview-1671--kleros-v2-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 7, 2024

Deploy Preview for kleros-v2-neo ready!

Name Link
🔨 Latest commit 94c4074
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2-neo/deploys/6700080bfc3c1c0008edcbb4
😎 Deploy Preview https://deploy-preview-1671--kleros-v2-neo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 7, 2024

Deploy Preview for kleros-v2-university failed. Why did it fail? →

Name Link
🔨 Latest commit 94c4074
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2-university/deploys/6700080b8cd2140008c81a55

Copy link

sonarqubecloud bot commented Aug 7, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 4066228 and 0bc4fd4.

Files ignored due to path filters (1)
  • web/src/assets/svgs/icons/long-arrow-up.svg is excluded by !**/*.svg
Files selected for processing (8)
  • web/src/components/ExtraStatsDisplay.tsx (1 hunks)
  • web/src/hooks/queries/useHomePageBlockQuery.ts (1 hunks)
  • web/src/hooks/queries/useHomePageExtraStats.ts (1 hunks)
  • web/src/hooks/queries/useHomePageQuery.ts (1 hunks)
  • web/src/hooks/useBlockByTimestamp.tsx (1 hunks)
  • web/src/pages/Home/CourtOverview/ExtraStats.tsx (1 hunks)
  • web/src/pages/Home/CourtOverview/index.tsx (2 hunks)
  • web/src/utils/date.ts (1 hunks)
Additional comments not posted (20)
web/src/pages/Home/CourtOverview/index.tsx (2)

5-5: Import statement for ExtraStats looks good.

The import path appears to be correct and consistent with the project structure.


19-19: Integration of ExtraStats component looks good.

The ExtraStats component is correctly rendered within the CourtOverview component.

web/src/hooks/queries/useHomePageBlockQuery.ts (3)

1-7: Import statements look good.

The necessary imports for useQuery, useGraphqlBatcher, graphql, and HomePageBlockQuery are correctly included.


9-19: GraphQL query definition looks good.

The query is correctly defined to fetch court data based on a block number and includes all necessary fields.


21-37: Custom hook useHomePageBlockQuery implementation looks good.

The hook is correctly implemented and uses useQuery to fetch data based on the block number. The query logic and error handling are properly managed.

web/src/hooks/queries/useHomePageQuery.ts (1)

22-27: GraphQL query modifications look good.

The query now includes sorting parameters and additional fields feeForJuror and stake, which are correctly added.

web/src/components/ExtraStatsDisplay.tsx (5)

1-5: Imports look good.

The imported modules are appropriate for the functionality provided in the file.


6-31: Styled components are well-defined.

The styled components Container, SVGContainer, and TextContainer are well-defined and follow best practices.


33-37: Interface definition is well-defined.

The interface IExtraStatsDisplay ensures type safety for the props of the ExtraStatsDisplay component.


39-49: Functional component is well-defined.

The ExtraStatsDisplay component is well-defined and follows best practices. It conditionally renders StyledSkeleton if text is null.


51-51: Export statement is appropriate.

The ExtraStatsDisplay component is appropriately exported as the default export.

web/src/pages/Home/CourtOverview/ExtraStats.tsx (4)

1-13: Imports look good.

The imported modules are appropriate for the functionality provided in the file.


14-27: Styled component is well-defined.

The styled component StyledCard is well-defined and follows best practices.


29-33: Interface definition is well-defined.

The interface IStat ensures type safety for the stats configuration.


35-51: Stats configuration is well-defined.

The stats array contains the configuration for the stats to be displayed and follows best practices.

web/src/hooks/queries/useHomePageExtraStats.ts (3)

1-13: Imports look good.

All necessary imports are correctly included.


14-38: Type definitions look good.

The type definitions are correctly defined and necessary for the hook's functionality.


16-32: Utility functions look good.

The utility functions are correctly implemented and optimized for performance.

web/src/hooks/useBlockByTimestamp.tsx (2)

1-7: Imports look good.

All necessary imports are correctly included.


8-12: State and effect hooks look good.

The state and effect hooks are correctly implemented.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range and nitpick comments (1)
web/src/consts/averageBlockTimeInSeconds.ts (1)

3-3: Consider fetching the block times dynamically.

While hardcoding the average block times provides a simple solution, it might require manual updates if the values change in the future. Consider implementing a mechanism to fetch the block times dynamically from a reliable source to ensure the values remain up-to-date.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0d0a60e and 154ea0c.

Files selected for processing (5)
  • web/src/components/ExtraStatsDisplay.tsx (1 hunks)
  • web/src/consts/averageBlockTimeInSeconds.ts (1 hunks)
  • web/src/hooks/queries/useHomePageExtraStats.ts (1 hunks)
  • web/src/pages/Home/CourtOverview/ExtraStats.tsx (1 hunks)
  • web/src/pages/Home/CourtOverview/Header.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (3)
  • web/src/components/ExtraStatsDisplay.tsx
  • web/src/pages/Home/CourtOverview/ExtraStats.tsx
  • web/src/pages/Home/CourtOverview/Header.tsx
Additional comments not posted (8)
web/src/consts/averageBlockTimeInSeconds.ts (1)

1-3: LGTM!

The code is well-structured and provides a clear way to access average block times for specific networks. The use of a constant object and importing the network IDs from the viem library ensures consistency and maintainability.

web/src/hooks/queries/useHomePageExtraStats.ts (7)

1-13: LGTM!

The imports are relevant and necessary for the functionality implemented in this file.


14-14: LGTM!

The type alias Court is correctly defined and improves code readability by providing a semantic name for the type.


16-24: LGTM!

The function getCourtWithMaxDifference correctly calculates the court with the maximum difference in the number of disputes between the two arrays of Court objects.


26-28: LGTM!

The function getCourtWithMaxReward correctly returns the court with the maximum fee for jurors from the given array of Court objects.


30-32: LGTM!

The function getCourtWithMaxChance correctly returns the court with the maximum stake from the given array of Court objects.


34-38: LGTM!

The interface HomePageExtraStatsType correctly defines the structure of the object returned by the useHomePageExtraStats hook.


40-70: LGTM!

The useHomePageExtraStats hook is well-implemented and correctly calculates the additional statistics for the homepage. It uses the useHomePageContext and useHomePageBlockQuery hooks to fetch the necessary data, performs the calculations using helper functions, and memoizes the results for optimal performance. The returned object matches the HomePageExtraStatsType interface.

coderabbitai[bot]
coderabbitai bot previously approved these changes Sep 18, 2024
coderabbitai[bot]
coderabbitai bot previously approved these changes Sep 18, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Outside diff range and nitpick comments (2)
web/src/hooks/queries/useHomePageExtraStats.ts (1)

3-4: Consider importing DEFAULT_CHAIN from a more generic location.

The constant DEFAULT_CHAIN is imported from consts/chains. To improve reusability and maintainability, consider moving this constant to a more generic location, such as a config or constants directory at the root level of the project. This will make it easier to access and modify the default chain value across different parts of the application.

web/src/hooks/queries/useHomePageBlockQuery.ts (1)

35-50: Consider adding error handling and loading state management.

The useHomePageBlockQuery hook utilizes the useQuery hook from the @tanstack/react-query library, which is a good practice for data fetching and caching. However, consider adding error handling and loading state management to improve the user experience and handle potential issues gracefully.

You can destructure the error and isLoading properties from the usedQuery object and handle them accordingly in the component that consumes this hook. For example:

const { data, error, isLoading } = useHomePageBlockQuery(blockNumber);

if (isLoading) {
  return <LoadingSpinner />;
}

if (error) {
  return <ErrorMessage error={error} />;
}
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 80912c4 and a774c26.

Files selected for processing (3)
  • web/src/hooks/queries/useHomePageBlockQuery.ts (1 hunks)
  • web/src/hooks/queries/useHomePageExtraStats.ts (1 hunks)
  • web/src/pages/Home/CourtOverview/ExtraStats.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • web/src/pages/Home/CourtOverview/ExtraStats.tsx
Additional comments not posted (7)
web/src/hooks/queries/useHomePageExtraStats.ts (4)

1-2: Verify the imported dependencies are used.

The imported dependencies useEffect, useState, useBlockNumber, and averageBlockTimeInSeconds are being used correctly within the hook. No unused imports detected.

Also applies to: 6-7


9-12: LGTM!

The hook initializes the state variable oneWeekAgoBlockNumber and retrieves the current block number using the useBlockNumber hook from the wagmi library. The usage of the DEFAULT_CHAIN constant as the chainId parameter ensures consistency in fetching the block number for the desired chain.


1-23: Ensure proper error handling.

The hook useHomePageExtraStats is well-implemented, but consider adding error handling for the data fetching logic to improve robustness.


13-18: Verify the calculation of oneWeekInBlocks.

The useEffect hook calculates the number of blocks equivalent to one week using the averageBlockTimeInSeconds constant. This calculation appears to be correct, as it converts the duration of one week in seconds to the corresponding number of blocks based on the average block time for the specified chain.

To verify the calculation, run the following script:

Verification successful

Calculation of oneWeekInBlocks is correct and flexible

The implementation correctly calculates oneWeekInBlocks using the formula:

Math.floor((7 * 24 * 3600) / averageBlockTimeInSeconds[DEFAULT_CHAIN])

This calculation is flexible and adapts to the current chain:

  • For Arbitrum (production): ~2,338,461 blocks
  • For Arbitrum Sepolia (non-production): ~2,268,656 blocks

The use of DEFAULT_CHAIN ensures the correct average block time is used based on the deployment environment.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the calculation of `oneWeekInBlocks` is correct.

# Test: Check if the calculation matches the expected value.
expected_value=$(echo "scale=0; (7 * 24 * 3600) / $(jq -r ".\"$DEFAULT_CHAIN\"" consts/averageBlockTimeInSeconds.json)" | bc)
if [[ $(rg -o $'oneWeekInBlocks = (\d+)' -r '$1' web/src/hooks/queries/useHomePageExtraStats.ts) -eq $expected_value ]]; then
  echo "Calculation is correct"
else
  echo "Calculation is incorrect"
fi

Length of output: 444


Script:

#!/bin/bash

# View the contents of useHomePageExtraStats.ts
echo "Contents of useHomePageExtraStats.ts:"
cat web/src/hooks/queries/useHomePageExtraStats.ts

# Search for averageBlockTimeInSeconds definition
echo -e "\nSearching for averageBlockTimeInSeconds definition:"
rg "const averageBlockTimeInSeconds" -A 5

# Search for DEFAULT_CHAIN definition
echo -e "\nSearching for DEFAULT_CHAIN definition:"
rg "const DEFAULT_CHAIN" -A 1

Length of output: 1684

web/src/hooks/queries/useHomePageBlockQuery.ts (3)

1-8: LGTM!

The imports and exports are properly organized and follow the necessary conventions.


125-126: LGTM!

The hook returns the computed courtActivityStats object, which can be consumed by the components that require this data.


10-33: Verify the GraphQL query fields align with the schema and requirements.

The GraphQL query appears to be well-structured and includes the necessary fields for fetching court data. However, please ensure that the fields being queried, such as numberDisputes, feeForJuror, and stake, are available in the GraphQL schema and provide the expected data for the desired functionality.

Run the following script to verify the GraphQL schema:

Verification successful

To further investigate the 'stake' field, which is present in our GraphQL query but not directly visible in the schema, let's search the codebase for any mentions of 'stake' in relation to the Court type. This will help us determine if it's a valid field or if it needs to be flagged as an issue.


Let's modify our search strategy to look for the 'stake' field in relation to the Court type, focusing on TypeScript files and using a more general search pattern.


The 'stake' field in the GraphQL query is valid and aligns with the schema.

After a thorough investigation of the codebase, we can confirm that the 'stake' field is a valid part of the Court type in the GraphQL schema. It is extensively used throughout the system in various contexts, including queries, calculations, and event definitions. The presence of this field in the HomePageBlock query is correct and consistent with the overall data structure and requirements of the application.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the GraphQL query fields align with the schema.

# Test: Search for the GraphQL schema file. Expect: A schema file containing the queried fields.
fd -e graphql -x cat {} | rg -e 'type Court' -A 15

Length of output: 1332


Script:

#!/bin/bash
# Search for 'stake' in relation to the Court type
rg -i "court.*stake|stake.*court" --type ts --type graphql -C 3

Length of output: 97


Script:

#!/bin/bash
# Search for 'stake' in relation to the Court type in TypeScript files
rg -i "court.*stake|stake.*court" --type ts -C 3

# Search for 'Court' type definition in TypeScript files
rg -i "type Court" --type ts -C 10

# Search for 'stake' field in any GraphQL query or type definition
fd -e ts -x cat {} | rg -i "(query|type).*\{" -A 20 | rg -i "stake"

Length of output: 82002

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range and nitpick comments (2)
web/src/components/StyledSkeleton.tsx (1)

12-14: Consider adding a prop to customize the margin-bottom value.

To make the StyledCaseCardTitleSkeleton component more reusable and flexible, consider adding a prop that allows customizing the margin-bottom value. This way, the component can be used in different contexts where different spacing might be required.

Here's an example of how you can modify the component to accept a custom marginBottom prop:

-export const StyledCaseCardTitleSkeleton = styled(StyledSkeleton)`
-  margin-bottom: 16px;
-`;
+export const StyledCaseCardTitleSkeleton = styled(StyledSkeleton)<{ marginBottom?: number }>`
+  margin-bottom: ${({ marginBottom }) => marginBottom ?? 16}px;
+`;

With this change, you can use the component like this:

<StyledCaseCardTitleSkeleton marginBottom={24} />
web/src/components/DisputeView/DisputeCardView.tsx (1)

Line range hint 1-64: Consider adding a loading state for the dispute information.

The DisputeInfo component is not wrapped with a loading state, which may lead to inconsistent loading behavior. Consider adding a loading skeleton for the dispute information to enhance the user experience during loading states.

Here's an example of how you can implement the loading state for the DisputeInfo component:

+import { StyledDisputeInfoSkeleton } from "components/StyledSkeleton";

// ...

const DisputeCardView: React.FC<IDisputeCardView> = ({ isLoading, ...props }) => {
  const navigate = useNavigate();
  return (
    <StyledCard hover onClick={() => navigate(`/cases/${props?.disputeID?.toString()}`)}>
      <PeriodBanner id={parseInt(props?.disputeID)} period={props?.period} />
      <CardContainer>
        {isLoading ? <StyledCaseCardTitleSkeleton /> : <TruncatedTitle text={props?.title} maxLength={100} />}
-       <DisputeInfo {...props} />
+       {isLoading ? <StyledDisputeInfoSkeleton /> : <DisputeInfo {...props} />}
      </CardContainer>
    </StyledCard>
  );
};

Make sure to create the corresponding StyledDisputeInfoSkeleton component in the StyledSkeleton.tsx file.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a774c26 and 20a27f8.

Files selected for processing (2)
  • web/src/components/DisputeView/DisputeCardView.tsx (2 hunks)
  • web/src/components/StyledSkeleton.tsx (1 hunks)
Additional comments not posted (3)
web/src/components/StyledSkeleton.tsx (2)

12-14: LGTM!

The new StyledCaseCardTitleSkeleton component extends the existing StyledSkeleton component and adds a specific margin-bottom of 16px. This addition is a valid enhancement to improve the visual spacing and layout of the skeleton loading state for case card titles.


12-14: Verify the usage of StyledCaseCardTitleSkeleton in the codebase.

Ensure that the new StyledCaseCardTitleSkeleton component is being used appropriately in the relevant parts of the codebase where case card titles are displayed during loading states.

Run the following script to verify the component usage:

Verification successful

Verified: StyledCaseCardTitleSkeleton is used correctly for loading states

The StyledCaseCardTitleSkeleton component is being used appropriately in the codebase, specifically in the DisputeCardView component. It's correctly implemented to display a skeleton loader for case card titles during loading states.

Key findings:

  • Imported and used in web/src/components/DisputeView/DisputeCardView.tsx
  • Properly implemented in a conditional rendering based on isLoading state
  • Component definition in web/src/components/StyledSkeleton.tsx matches the provided code snippet
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `StyledCaseCardTitleSkeleton` in the codebase.

# Test: Search for the component usage. Expect: Occurrences in relevant files.
rg --type tsx -A 5 $'StyledCaseCardTitleSkeleton'

Length of output: 76


Script:

#!/bin/bash
# Description: Verify the usage of `StyledCaseCardTitleSkeleton` in the codebase.

# Find all .tsx files and search for StyledCaseCardTitleSkeleton within them
fd -e tsx -X rg -A 5 'StyledCaseCardTitleSkeleton'

Length of output: 1477

web/src/components/DisputeView/DisputeCardView.tsx (1)

57-57: LGTM!

The component now uses the StyledCaseCardTitleSkeleton for the loading state, which aligns with the updated import statement. The conditional rendering logic remains intact and functions as expected.

Copy link
Contributor

@Harman-singh-waraich Harman-singh-waraich left a comment

Choose a reason for hiding this comment

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

lgtm!

@alcercu alcercu added this pull request to the merge queue Oct 7, 2024
Merged via the queue into dev with commit ad34b56 Oct 7, 2024
15 of 23 checks passed
@jaybuidl jaybuidl deleted the feat(web)/Extra-statistics-on-the-Home-page branch October 8, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extra statistics on the Home page
5 participants