Skip to content

Commit

Permalink
fix: remove sonner
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jul 13, 2023
1 parent 6db88f7 commit 9270e11
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 49 deletions.
46 changes: 2 additions & 44 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/atoms/owner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const login = async (username?: string, password?: string) => {
if (username && password) {
const user = await apiClient.user.login(username, password).catch((err) => {
console.error(err)
toast('再试试哦', 'error')
toast.error('再试试哦')
throw err
})
if (user) {
Expand All @@ -36,7 +36,7 @@ export const login = async (username?: string, password?: string) => {
if (!token) {
return
}
const outdateToast = () => toast('登录身份过期了,再登录一下吧!', 'warning')
const outdateToast = () => toast.warn('登录身份过期了,再登录一下吧!')
const validated = await apiClient.user
.checkTokenValid(token)
.then((res) => !!res.ok)
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/header/internal/AnimatedLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const TapableLogo = () => {
const adminUrl = getAdminUrl()
if (adminUrl) location.href = adminUrl
else {
toast('Admin url not found', 'error')
toast.error('Admin url not found')
}
return
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/code-highlighter/CodeHighlighter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const HighLighter: FC<Props> = (props) => {

const handleCopy = useCallback(() => {
navigator.clipboard.writeText(value)
toast('COPIED!', 'success')
toast.success('COPIED!')
}, [value])

const prevThemeCSS = useRef<ReturnType<typeof loadStyleSheet>>()
Expand Down
2 changes: 1 addition & 1 deletion src/components/widgets/subscribe/SubscribeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const SubscribeModal: FC<SubscribeModalProps> = ({
Object.keys(types).filter((name) => state.types[name]) as any[],
)

toast('订阅成功,谢谢你!', 'success')
toast.success('订阅成功,谢谢你!')
dispatch({ type: 'reset' })
onConfirm()
}
Expand Down

1 comment on commit 9270e11

@vercel
Copy link

@vercel vercel bot commented on 9270e11 Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

shiro – ./

shiro-git-main-innei.vercel.app
shiro-innei.vercel.app
springtide.vercel.app
innei.in

Please sign in to comment.