Skip to content

Commit

Permalink
feat(edit-resource): add placeholder for edit resource component
Browse files Browse the repository at this point in the history
  • Loading branch information
yomatters committed Sep 17, 2024
1 parent 4b0ee76 commit 0a848bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/edit-resource/EditResource.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function EditResource({ resourceId }) {
return <>Edit resource ID {resourceId}!</>;
}
8 changes: 7 additions & 1 deletion src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Provider } from "react-redux";

import AllocationsMap from "./allocations-map/AllocationsMap";

import EditResource from "./edit-resource/EditResource";

import Projects from "./projects/Projects";
import apiSlice from "./projects/helpers/apiSlice";
import projectsConfig from "./projects/helpers/config";
Expand Down Expand Up @@ -54,6 +56,10 @@ export function allocationsMap({ target }) {
ReactDOM.createRoot(target).render(<AllocationsMap />);
}

export function editResource({ resourceId, target }) {
ReactDOM.createRoot(target).render(<EditResource resourceId={resourceId} />);
}

export function projects({ target, username, routes }) {
// Override the default routes with the ones from Rails.
if (routes) projectsConfig.routes = routes;
Expand All @@ -77,7 +83,7 @@ export function projectsBrowser({ target, apiUrl }) {
preloadedState: {
projectsBrowser: {
...projectsBrowserInitialState,
apiUrl
apiUrl,
},
},
});
Expand Down

0 comments on commit 0a848bc

Please sign in to comment.