mirror of https://github.com/certusone/oyster.git
chore: lint errors
This commit is contained in:
parent
90546db0e5
commit
61f4be3cbd
|
@ -112,10 +112,6 @@ export const registerProgramGovernance = async (
|
|||
);
|
||||
}
|
||||
|
||||
const councilMintSeed = uninitializedTimelockConfig.councilMint
|
||||
? uninitializedTimelockConfig.councilMint.toBuffer()
|
||||
: Buffer.from('');
|
||||
|
||||
const [timelockConfigKey] = await PublicKey.findProgramAddress(
|
||||
[
|
||||
Buffer.from(GOVERNANCE_AUTHORITY_SEED),
|
||||
|
|
|
@ -14,10 +14,6 @@ const MAX_BUBBLE_AMOUNT = 50;
|
|||
|
||||
export function VoterBubbleGraph(props: IVoterBubbleGraph) {
|
||||
const { data, width, height, endpoint } = props;
|
||||
const subdomain = endpoint
|
||||
.replace('http://', '')
|
||||
.replace('https://', '')
|
||||
.split('.')[0];
|
||||
|
||||
// For some reason giving this a type causes an issue where setRef
|
||||
// cant be used with ref={} prop...not sure why. SetStateAction nonsense.
|
||||
|
@ -31,6 +27,14 @@ export function VoterBubbleGraph(props: IVoterBubbleGraph) {
|
|||
d.name.slice(d.name.length - 3, d.name.length),
|
||||
}));
|
||||
//console.log('Data', limitedData);
|
||||
|
||||
useEffect(() => {
|
||||
if (ref) {
|
||||
const subdomain = endpoint
|
||||
.replace('http://', '')
|
||||
.replace('https://', '')
|
||||
.split('.')[0];
|
||||
|
||||
const format = d3.format(',d');
|
||||
const color = d3
|
||||
.scaleOrdinal()
|
||||
|
@ -47,8 +51,6 @@ export function VoterBubbleGraph(props: IVoterBubbleGraph) {
|
|||
);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (ref) {
|
||||
ref.innerHTML = '';
|
||||
const root = pack(limitedData);
|
||||
// console.log('Re-rendered');
|
||||
|
@ -127,7 +129,7 @@ export function VoterBubbleGraph(props: IVoterBubbleGraph) {
|
|||
}${format(d.value)}`,
|
||||
);
|
||||
}
|
||||
}, [ref, limitedData, height, width]);
|
||||
}, [ref, limitedData, height, width, endpoint]);
|
||||
|
||||
return (
|
||||
<div
|
||||
|
|
|
@ -155,6 +155,7 @@ function voterDisplayData(
|
|||
title: key,
|
||||
group: label,
|
||||
value: amount,
|
||||
key: key,
|
||||
});
|
||||
|
||||
const undecidedData = [
|
||||
|
@ -198,6 +199,7 @@ function voterDisplayData(
|
|||
const data = [...undecidedData, ...yesData, ...noData].sort(
|
||||
(a, b) => b.value - a.value,
|
||||
);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue