Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
runemadsen committed Jul 25, 2022
1 parent 6dabde8 commit 51a75d2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"clean": "gatsby clean"
},
"dependencies": {
"@designsystemsinternational/react-admin-github": "^0.2.0",
"@designsystemsinternational/react-admin-github": "^0.7.1",
"@loadable/component": "^5.15.2",
"gatsby": "^4.17.2",
"react": "^18.1.0",
Expand Down
8 changes: 7 additions & 1 deletion src/components/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import {
} from "@designsystemsinternational/react-admin-github";
import { PostList, PostEdit, PostCreate, PostIcon } from "./posts";
import { FileList, FileCreate, FileIcon } from "./files";
import { ReleaseList, ReleaseCreate, ReleaseIcon } from "./releases";
import {
ReleaseList,
ReleaseCreate,
ReleaseEdit,
ReleaseIcon,
} from "./releases";

const authProvider = buildAuthProvider("/.netlify/functions/proxy");
const dataProvider = buildDataProvider("/.netlify/functions/proxy", {
Expand Down Expand Up @@ -38,6 +43,7 @@ const AdminPage = () => {
<Resource
name="releases"
list={ReleaseList}
edit={ReleaseEdit}
create={ReleaseCreate}
icon={ReleaseIcon}
/>
Expand Down
12 changes: 2 additions & 10 deletions src/components/admin/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import {
DateField,
EditButton,
TextInput,
ImageInput,
ImageField,
} from "react-admin";
import NewReleasesIcon from "@mui/icons-material/NewReleases";
export const ReleaseIcon = NewReleasesIcon;
Expand All @@ -33,23 +31,17 @@ export const ReleaseEdit = (props) => (
<Edit title={<ReleaseTitle />} {...props}>
<SimpleForm>
<TextInput disabled source="id" />
<TextInput source="title" />
<TextInput source="name" />
<TextInput multiline source="body" />
<ImageInput source="picture" label="Picture" accept="image/*">
<ImageField source="url" title="id" />
</ImageInput>
</SimpleForm>
</Edit>
);

export const ReleaseCreate = (props) => (
<Create title="Create a Release" {...props}>
<SimpleForm>
<TextInput source="title" />
<TextInput source="name" />
<TextInput multiline source="body" />
<ImageInput source="picture" label="Picture" accept="image/*">
<ImageField source="url" title="id" />
</ImageInput>
</SimpleForm>
</Create>
);

0 comments on commit 51a75d2

Please sign in to comment.