Skip to content

Commit

Permalink
fix infinite refresh issue when proposal expiration is too far in the…
Browse files Browse the repository at this point in the history
… future, wrap long title better, and update browser list
  • Loading branch information
NoahSaso committed Dec 6, 2024
1 parent e1b7f2e commit 0aae9aa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const ProposalContentDisplay = ({
/>
)}

<p className="header-text sm:hero-text break-words">{title}</p>
<p className="header-text sm:hero-text break-all">{title}</p>
</div>

{approvalContext &&
Expand Down
7 changes: 6 additions & 1 deletion packages/stateless/hooks/useExecuteAt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ export const useExecuteAt = ({ fn, date }: UseExecuteAtOptions) => {
}

const msRemaining = dateTime - Date.now()
if (msRemaining < 0) {
// From `setTimeout` docs: When delay is larger than 2147483647 or less than
// 1, the delay will be set to 1.
//
// Basically, make sure not to trigger if the date is in the past or too far
// in the future.
if (msRemaining < 0 || msRemaining > 2147483647) {
return
}

Expand Down
11 changes: 8 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11960,9 +11960,14 @@ camelcase@^6.2.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==

caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001517, caniuse-lite@^1.0.30001587:
version "1.0.30001632"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz"
integrity sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==
version "1.0.30001687"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz"
integrity sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==

caniuse-lite@^1.0.30001687:
version "1.0.30001687"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz#d0ac634d043648498eedf7a3932836beba90ebae"
integrity sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==

capital-case@^1.0.4:
version "1.0.4"
Expand Down

0 comments on commit 0aae9aa

Please sign in to comment.