mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-22 23:18:05 +03:00
fix: rival changes should reasonably diff (#1718)
This commit is contained in:
+4
-1
@@ -119,9 +119,12 @@ function RivalsOverviewPage({
|
||||
return <div>Looks like you're not signed in. How did you get to this page?</div>;
|
||||
}
|
||||
|
||||
const rivalIdsKey = (users: Array<UserDocument>) => users.map((e) => e.id).join(",");
|
||||
const hasUnsavedRivalChanges = rivalIdsKey(currentRivals) !== rivalIdsKey(rivals);
|
||||
|
||||
return (
|
||||
<>
|
||||
{isRequestingUser && currentRivals.toString() !== rivals.toString() && (
|
||||
{isRequestingUser && hasUnsavedRivalChanges && (
|
||||
<Alert className="vstack" variant="warning">
|
||||
<Prompt
|
||||
message={
|
||||
|
||||
Reference in New Issue
Block a user