Save comment sort per user rather than per contract

This commit is contained in:
Ian Philips 2022-10-06 10:16:29 -04:00
parent e127f9646a
commit 26f04fb04a

View File

@ -81,7 +81,7 @@ const CommentsTabContent = memo(function CommentsTabContent(props: {
const tips = useTipTxns({ contractId: contract.id })
const comments = useComments(contract.id) ?? props.comments
const [sort, setSort] = usePersistentState<'Newest' | 'Best'>('Best', {
key: `contract-${contract.id}-comments-sort`,
key: `contract-comments-sort`,
store: storageStore(safeLocalStorage()),
})
const me = useUser()