feat(frontend): add API client, layout, and routing
- Create Axios-based API client with sources, jobs, and dashboard endpoints - Add responsive Layout component with navigation sidebar - Set up React Router with Dashboard, Backups, and Settings routes - Configure TanStack Query provider with default options - Use lucide-react for navigation icons
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
import isWindow from './isWindow';
|
||||
export default function getscrollAccessor(offset) {
|
||||
var prop = offset === 'pageXOffset' ? 'scrollLeft' : 'scrollTop';
|
||||
|
||||
function scrollAccessor(node, val) {
|
||||
var win = isWindow(node);
|
||||
|
||||
if (val === undefined) {
|
||||
return win ? win[offset] : node[prop];
|
||||
}
|
||||
|
||||
if (win) {
|
||||
win.scrollTo(win[offset], val);
|
||||
} else {
|
||||
node[prop] = val;
|
||||
}
|
||||
}
|
||||
|
||||
return scrollAccessor;
|
||||
}
|
||||
Reference in New Issue
Block a user