Skip to content

Commit

Permalink
adding warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Grato committed Nov 27, 2023
1 parent 9561320 commit 58c2c1b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
8 changes: 8 additions & 0 deletions client/classes/Hub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ export default class Hub {
return Math.min(100, this.currentStorageMb / this.storageLimitMb) * 100;
}

/**
* Check if user has gone over storage max
* @returns Boolean
*/
hasReachedMaxStorage(): boolean {
return this.storageLimitMb < Number(this.currentStorageMb);
}

/**
* Storage State
* @returns StorageStateE
Expand Down
4 changes: 1 addition & 3 deletions client/layouts/SidePanelLayout/SidePanelLayout.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@

.warning {
max-width: 1200px;
width: 100%;
margin-bottom: 24px;
@include tablet-down {
max-width: 100%;
}
}
23 changes: 13 additions & 10 deletions client/layouts/SidePanelLayout/SidePanelLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,20 @@ const SidePanelLayout = ({

return (
<>
{/* <div className="flex-justify-center mt-20 px-20">
<div className={styles.warning}>
<Warning
title="Be Advised"
message="We are aware of an outage currently impacting Starter and Personal plans in one of our service regions. If your assigned URL contains 'us1' you may be affected by this outage. Our team is actively working to resolve the issue, and we appreciate your patience. We apologize for any inconvenience this may cause. If you have any questions regarding this issue, please contact us,"
onClick={() => {
window.open('mailto:[email protected]');
}}
/>
{hub.hasReachedMaxStorage() && (
<div className="flex-justify-center mt-20 px-20">
<div className={styles.warning}>
<Warning
title="Storage Maximum Reached"
message="Be Advised - The content storage has exceted the alloted maximum. Stored data may be affected. Contact us if you have any questions."
onClick={() => {
window.open('mailto:[email protected]');
}}
/>
</div>
</div>
</div> */}
)}

<section className={styles.layout_wrapper}>
{children}
{/* SIDE PANEL WIDGET */}
Expand Down

0 comments on commit 58c2c1b

Please sign in to comment.