Skip to content

Hardcoded values: Aristotle, Level, level circular progress, Coherent votes on Dashboard/JurorInfo/Coherency.tsx #656

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

Closed
Tracked by #625
kemuru opened this issue Mar 29, 2023 · 1 comment

Comments

@kemuru
Copy link
Contributor

kemuru commented Mar 29, 2023

maybe create a new query file for this, something like "useCoherentVotes":

import useSWR from "swr";
import { gql } from "graphql-request";
import { User } from "src/graphql/graphql";
export type { User };

const coherentVotesQuery = gql`
  query User($id: ID) {
    penalties {
      degreeOfCoherency
    }
  }
`;

export const useCoherentVotes = (id: string): { data: typeof result; error: any; isValidating: boolean } => {
  const { data, error, isValidating } = useSWR({
    query: coherentVotesQuery,
    variables: { id: id },
  });
  const result = data ? (data as User) : undefined;
  return { data: result, error, isValidating };
};
@kemuru kemuru mentioned this issue Mar 29, 2023
15 tasks
@jaybuidl jaybuidl changed the title Aristotle, Level, level circular progress, Coherent votes on Coherency on pages/Dashboard/JurorInfo/Coherency.tsx Hardcoded values: Aristotle, Level, level circular progress, Coherent votes on Dashboard/JurorInfo/Coherency.tsx Apr 14, 2023
@jaybuidl
Copy link
Member

image

@jaybuidl jaybuidl added this to the testnet-1.0.1 milestone Oct 3, 2023
@jaybuidl jaybuidl closed this as completed Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants