mirror of
https://github.com/coder/coder.git
synced 2026-09-21 20:51:01 +08:00
feat: animate <TerminalAlerts /> when isRefreshing (#22073)
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
} from "components/Alert/Alert";
|
||||
import { Button } from "components/Button/Button";
|
||||
import { Link } from "components/Link/Link";
|
||||
import { RefreshCcwIcon } from "lucide-react";
|
||||
import { RefreshCwIcon } from "lucide-react";
|
||||
import { type FC, useEffect, useRef, useState } from "react";
|
||||
import { cn } from "utils/cn";
|
||||
import { docs } from "utils/docs";
|
||||
@@ -206,7 +206,7 @@ const RefreshSessionButton: FC = () => {
|
||||
window.location.reload();
|
||||
}}
|
||||
>
|
||||
<RefreshCcwIcon />
|
||||
<RefreshCwIcon className={cn(isRefreshing && "animate-spin")} />
|
||||
{isRefreshing ? "Refreshing session..." : "Refresh session"}
|
||||
</Button>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user