Skip to content

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

Closed
@kemuru

Description

@kemuru

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 };
};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions