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:
+18
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
function createCustomError(name, message) {
|
||||
// use Object.create(), because some VMs prevent setting line/column otherwise
|
||||
// (iOS Safari 10 even throws an exception)
|
||||
const error = Object.create(SyntaxError.prototype);
|
||||
const errorStack = new Error();
|
||||
|
||||
return Object.assign(error, {
|
||||
name,
|
||||
message,
|
||||
get stack() {
|
||||
return (errorStack.stack || '').replace(/^(.+\n){1,3}/, `${name}: ${message}\n`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
exports.createCustomError = createCustomError;
|
||||
Reference in New Issue
Block a user