Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default () => {
const [state, ref] = useSize(document.body)
return (
<div style="{{">
</div>
)
}
export default function ToggleBanner({
fullWidth,
collapsedWidth,
collapsed,
onToggle,
}) {
const [bannerSize, bannerRef] = useSize()
const bannerStyle = {
opacity: collapsed ? 0 : 1,
height: collapsed ? toggleHeight : bannerSize.height || 0,
}
const buttonStyle = {
left: collapsed ? 0 : fullWidth - toggleWidth,
width: collapsed ? collapsedWidth : toggleWidth,
}
const { data, isLoading } = useClientRequest((reqConfig) =>
client.getInstance().infoGet(reqConfig)
)
const version = useMemo(() => {
if (data) {
return parseVersion(data)
export default function ToggleBanner({
fullWidth,
collapsedWidth,
collapsed,
onToggle,
}) {
const [bannerSize, bannerRef] = useSize()
const transBanner = useSpring({
opacity: collapsed ? 0 : 1,
height: collapsed ? toggleHeight : bannerSize.height || 0,
})
const transButton = useSpring({
left: collapsed ? 0 : fullWidth - toggleWidth,
width: collapsed ? collapsedWidth : toggleWidth,
})
const { data, isLoading } = useClientRequest((cancelToken) =>
client.getInstance().getInfo({ cancelToken })
)
const version = useMemo(() => {
if (data) {
return parseVersion(data)