Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github action #30

Merged
merged 4 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/frontend-service-tests-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,12 @@ jobs:
with:
service-id: ${{ secrets.MY_RENDER_SERVICE_ID_FE }}
api-key: ${{ secrets.MY_RENDER_API_KEY }}
wait-for-success: true

- name: Wait for Render Deployment
uses: bounceapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
service-id: ${{ secrets.MY_RENDER_SERVICE_ID_FE }}
retries: 20
wait: 60000
sleep: 30000
26 changes: 11 additions & 15 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import { Button, Modal } from "antd";
import { Button } from "antd";
import "./App.css";
import NoteForm from "./components/NoteForm";
import NoteFormModal from "./components/NoteFormModal";
import NoteGrid from "./components/NoteGrid";
import Spinner from "./components/Spinner";
import type NoteType from "./types/note";
Expand Down Expand Up @@ -97,19 +97,15 @@ function App() {
{connectionIssue && (
<h3 className="connection-warning">Warning: API Connection Issue</h3>
)}
<Modal
title="Note Form"
open={isModalVisible}
onCancel={handleCancel}
footer={null}
>
<NoteForm
onCancel={handleCancel}
selectedNote={selectedNote}
addNote={addNote}
updateNote={updateNote}
/>
</Modal>

<NoteFormModal
isModalVisible={isModalVisible}
handleCancel={handleCancel}
selectedNote={selectedNote}
addNote={addNote}
updateNote={updateNote}
/>

{isDataLoading ? (
<Spinner />
) : (
Expand Down
32 changes: 32 additions & 0 deletions frontend/src/components/NoteFormModal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

import { Modal } from "antd";
import NoteForm from "./NoteForm";
import type NoteType from "../types/note";

interface ModalNoteFormProps {
addNote: (newNote: NoteType) => void;
updateNote: (updatedNote: NoteType) => void;
selectedNote: NoteType | null;
handleCancel: () => void;
isModalVisible: boolean;
}

const ModalNoteForm: React.FC<ModalNoteFormProps> = (props) => {
return (
<Modal
title="Note Form"
open={props.isModalVisible}
onCancel={props.handleCancel}
footer={null}
>
<NoteForm
onCancel={props.handleCancel}
selectedNote={props.selectedNote}
addNote={props.addNote}
updateNote={props.updateNote}
/>
</Modal>
);
}

export default ModalNoteForm;
Loading