Skip to content

Commit

Permalink
fix: update template
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh committed Dec 7, 2023
1 parent 1f102ec commit 22e0993
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
1 change: 0 additions & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
with:
cypress: true


- name: Build App
run: yarn build:test
shell: bash
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,12 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node
package-name: graasp-app-starter-ts-vite
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"docs","section":"Documentation","hidden":false},{"type":"test","section":"Tests","hidden":false}]'

- uses: actions/checkout@v4
with:
ref: main

- name: Tag major and minor versions
uses: jacobsvante/[email protected]
if: ${{ steps.release.outputs.releases_created }}
with:
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}

- name: Set tag
if: ${{ steps.release.outputs.releases_created }}
Expand Down
24 changes: 24 additions & 0 deletions src/modules/main/BuilderView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,25 @@ const AppSettingsDisplay = (): JSX.Element => {
);
};

const AppActionsDisplay = (): JSX.Element => {
const { data: appActions } = hooks.useAppActions();
return (
<Box p={2}>
<Typography>App Actions</Typography>
{appActions ? (
<pre>{JSON.stringify(appActions, null, 2)}</pre>
) : (
<Typography>Loading</Typography>
)}
</Box>
);
};

const BuilderView = (): JSX.Element => {
const { permission } = useLocalContext();
const { data: appDatas } = hooks.useAppData();
const { mutate: postAppData } = mutations.usePostAppData();
const { mutate: postAppAction } = mutations.usePostAppAction();
const { mutate: patchAppData } = mutations.usePatchAppData();
const { mutate: deleteAppData } = mutations.useDeleteAppData();
const { mutate: postAppSetting } = mutations.usePostAppSetting();
Expand All @@ -33,6 +48,14 @@ const BuilderView = (): JSX.Element => {
Builder as {permission}
<Stack direction="column" spacing={2}>
<Stack direction="row" justifyContent="center" spacing={1}>
<Button
variant="outlined"
onClick={() =>
postAppAction({ data: { content: 'hello' }, type: 'an-action' })
}
>
Post new App Action
</Button>
<Button
variant="outlined"
onClick={() =>
Expand Down Expand Up @@ -73,6 +96,7 @@ const BuilderView = (): JSX.Element => {
<pre>{JSON.stringify(appDatas, null, 2)}</pre>
</Box>
<AppSettingsDisplay />
<AppActionsDisplay />
</Stack>
</div>
);
Expand Down

0 comments on commit 22e0993

Please sign in to comment.