Commit aaafbe0a by JustSong

chore: use notice to show password (#107)

parent 6bea2724
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Button, Form, Grid, Header, Image, Segment } from 'semantic-ui-react'; import { Button, Form, Grid, Header, Image, Segment } from 'semantic-ui-react';
import { API, copy, showError, showSuccess } from '../helpers'; import { API, copy, showError, showInfo, showNotice, showSuccess } from '../helpers';
import { useSearchParams } from 'react-router-dom'; import { useSearchParams } from 'react-router-dom';
const PasswordResetConfirm = () => { const PasswordResetConfirm = () => {
...@@ -33,7 +33,7 @@ const PasswordResetConfirm = () => { ...@@ -33,7 +33,7 @@ const PasswordResetConfirm = () => {
if (success) { if (success) {
let password = res.data.data; let password = res.data.data;
await copy(password); await copy(password);
showSuccess(`密码已重置并已复制到剪贴板:${password}`); showNotice(`密码已重置并已复制到剪贴板:${password}`);
} else { } else {
showError(message); showError(message);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment