2021-08-24 20:57:34 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import React, { useEffect } from 'react';
|
2021-10-26 19:15:33 +00:00
|
|
|
import type { LocalizerType } from '../types/Util';
|
2021-08-24 20:57:34 +00:00
|
|
|
|
|
|
|
export type PropsType = {
|
|
|
|
deleteAllData: () => void;
|
|
|
|
i18n: LocalizerType;
|
|
|
|
};
|
|
|
|
|
|
|
|
export function ClearingData({ deleteAllData, i18n }: PropsType): JSX.Element {
|
|
|
|
useEffect(() => {
|
|
|
|
deleteAllData();
|
|
|
|
}, [deleteAllData]);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="full-screen-flow overlay">
|
|
|
|
<div className="step">
|
|
|
|
<div className="inner">
|
|
|
|
<div className="step-body">
|
|
|
|
<span className="banner-icon delete" />
|
2023-03-30 00:03:25 +00:00
|
|
|
<div className="header">{i18n('icu:deleteAllDataProgress')}</div>
|
2021-08-24 20:57:34 +00:00
|
|
|
</div>
|
|
|
|
<div className="progress">
|
|
|
|
<div className="bar-container">
|
|
|
|
<div className="bar progress-bar progress-bar-striped active" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|