show a yellow dot
This commit is contained in:
parent
745be48927
commit
83b14343c2
1 changed files with 13 additions and 5 deletions
|
|
@ -28,9 +28,8 @@ import {
|
|||
import OSRContextMenu from "./OSRContextMenu";
|
||||
import PostHogPageView from "./PosthogPageView";
|
||||
|
||||
const LayoutTopDiv = styled(CustomScrollbarDiv)<{ showBorder: boolean }>`
|
||||
const LayoutTopDiv = styled(CustomScrollbarDiv)`
|
||||
height: 100%;
|
||||
border-top: ${(props) => (props.showBorder ? "1px solid yellow" : "none")};
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
`;
|
||||
|
|
@ -43,7 +42,7 @@ const GridDiv = styled.div`
|
|||
`;
|
||||
|
||||
const Layout = () => {
|
||||
const [showBorder, setShowBorder] = useState(false);
|
||||
const [showStagingIndicator, setShowStagingIndicator] = useState(false);
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
const dispatch = useAppDispatch();
|
||||
|
|
@ -63,7 +62,7 @@ const Layout = () => {
|
|||
undefined,
|
||||
);
|
||||
response.status === "success" &&
|
||||
setShowBorder(response.content.AUTH_TYPE.includes("staging"));
|
||||
setShowStagingIndicator(response.content.AUTH_TYPE.includes("staging"));
|
||||
})();
|
||||
}, []);
|
||||
|
||||
|
|
@ -247,7 +246,16 @@ const Layout = () => {
|
|||
return (
|
||||
<LocalStorageProvider>
|
||||
<AuthProvider>
|
||||
<LayoutTopDiv showBorder={showBorder}>
|
||||
<LayoutTopDiv>
|
||||
{showStagingIndicator && (
|
||||
<div
|
||||
title="running on staging"
|
||||
className="absolute right-0 mx-1.5 h-1.5 w-1.5 rounded-full"
|
||||
style={{
|
||||
backgroundColor: "var(--vscode-list-warningForeground)",
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<LumpProvider>
|
||||
<OSRContextMenu />
|
||||
<div
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue