From a3b668587dada55b06e032879b43a4f97a74e3cd Mon Sep 17 00:00:00 2001 From: keyan Date: Mon, 7 Aug 2023 16:26:15 -0500 Subject: [PATCH] fix top cowboys --- components/user-list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/user-list.js b/components/user-list.js index effca4db..c0c7a1d4 100644 --- a/components/user-list.js +++ b/components/user-list.js @@ -44,7 +44,7 @@ export default function UserList ({ ssrData, query, variables, destructureData } useEffect(() => { // shift the stat we are sorting by to the front const comps = [...STAT_COMPONENTS] - setStatComps(seperate([...comps.splice(STAT_POS[variables.by || 0], 1), ...comps], Seperator)) + setStatComps(seperate([...comps.splice(STAT_POS[variables?.by || 0], 1), ...comps], Seperator)) }, [variables?.by]) const { users, cursor } = useMemo(() => {