Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- name: Deploy to render
if: ${{ github.event_name == 'push' }}
run: curl https://api.render.com/deploy/srv-${{secrets.RENDER_VANILLA_SERVICE_ID}}?key=${{secrets.RENDER_API_KEY}}
run: curl https://api.render.com/deploy/srv-${{secrets.RENDER_VANILLA_SERVICE_ID}}?key=${{secrets.RENDER_VANILLA_API_KEY}}

redux_pipeline:
needs:
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:

- name: Deploy to render
if: ${{ github.event_name == 'push' }}
run: curl https://api.render.com/deploy/srv-${{secrets.RENDER_REDUX_SERVICE_ID}}?key=${{secrets.RENDER_API_KEY}}
run: curl https://api.render.com/deploy/srv-${{secrets.RENDER_REDUX_SERVICE_ID}}?key=${{secrets.RENDER_REDUX_API_KEY}}

query_pipeline:
needs:
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:

- name: Deploy to render
if: ${{ github.event_name == 'push' }}
run: curl https://api.render.com/deploy/srv-${{secrets.RENDER_QUERY_SERVICE_ID}}?key=${{secrets.RENDER_API_KEY}}
run: curl https://api.render.com/deploy/srv-${{secrets.RENDER_QUERY_SERVICE_ID}}?key=${{secrets.RENDER_QUERY_API_KEY}}

tag_release:
needs:
Expand Down
9 changes: 4 additions & 5 deletions FrontEnd/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<!doctype html>
<html lang="en" data-bs-theme="dark"></html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.css"></html>
<link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MiniBlogListApp</title>
</head>
<body>
<div id="root" class="container"></div></html>
<div id="root" class="container"></div>
<script type="module" src="/src/main.jsx"></script>
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.js"></script></html>
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.js"></script>
</body>
</html>
1 change: 0 additions & 1 deletion FrontEnd/public/vite.svg

This file was deleted.

8 changes: 4 additions & 4 deletions FrontEnd/src/components/AccountForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import Stack from 'react-bootstrap/Stack'


const AccountForm = ({ user, setUser, setError, setMessage, },) => {
const [username, setUsername,] = useState('',)
const [password, setPassword,] = useState('',)
const [username, setUsername,] = useState('admin',)
const [password, setPassword,] = useState('password',)

const loginHandler = (event,) => {
event.preventDefault()
Expand Down Expand Up @@ -47,13 +47,13 @@ const AccountForm = ({ user, setUser, setError, setMessage, },) => {
<Form.Group>
<InputGroup>
<InputGroup.Text>Username:</InputGroup.Text>
<Form.Control onChange={({ target, },) => { setUsername(target.value,) }} name='username' placeholder='username' type='text' />
<Form.Control value={username} onChange={({ target, },) => { setUsername(target.value,) }} name='username' placeholder='username' type='text' />
</InputGroup>
</Form.Group>
<Form.Group>
<InputGroup>
<InputGroup.Text>Password:</InputGroup.Text>
<Form.Control onChange={({ target, },) => { setPassword(target.value,) }} name='password' placeholder='password' type='password' />
<Form.Control value={password} onChange={({ target, },) => { setPassword(target.value,) }} name='password' placeholder='password' type='password' />
</InputGroup>
</Form.Group>
<Button variant='success' type='submit'>login</Button>
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ This project is a mini web application built with React, Vite, and Bootstrap. It

## Lives

- The base user is: admin
- The base password is: password

- [Vanilla FrontEnd](https://minibloglistappvanilla.onrender.com "Just with states")
- [ Redux FrontEnd](https://minibloglistapp.onrender.com "Using reduxjs/toolkit")
- [ Query FrontEnd](https://minibloglistappquery.onrender.com "Using the react query lib and some contexts")
Expand Down
9 changes: 4 additions & 5 deletions ReactQuery_FrontEnd/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<!doctype html>
<html lang="en" data-bs-theme="dark"></html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.css"></html>
<link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MiniBlogListApp</title>
</head>
<body>
<div id="root" class="container"></div></html>
<div id="root" class="container"></div>
<script type="module" src="/src/main.jsx"></script>
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.js"></script></html>
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.js"></script>
</body>
</html>
1 change: 0 additions & 1 deletion ReactQuery_FrontEnd/public/vite.svg

This file was deleted.

4 changes: 2 additions & 2 deletions ReactQuery_FrontEnd/src/components/AccountForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const AccountForm = () => {
const [notification, notificationDispatch,] = useContext(notificationContext,)
const [user, userDispatch,] = useContext(userContext,)
const navigate = useNavigate()
const password = useInput('password',)
const username = useInput('text',)
const password = useInput('password', 'password',)
const username = useInput('text', 'admin',)

const loginHandler = (event,) => {
event.preventDefault()
Expand Down
4 changes: 2 additions & 2 deletions ReactQuery_FrontEnd/src/hooks/useInput.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState, } from 'react'

export default (type,) => {
const [value, setValue,] = useState('',)
export default (type, initialValue,) => {
const [value, setValue,] = useState(initialValue || '',)
const onChange = (event,) => {
setValue(event.target.value,)
}
Expand Down
9 changes: 4 additions & 5 deletions Redux_FrontEnd/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<!doctype html>
<html lang="en" data-bs-theme="dark"></html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.css"></html>
<link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MiniBlogListApp</title>
</head>
<body>
<div id="root" class="container"></div></html>
<div id="root" class="container"></div>
<script type="module" src="/src/main.jsx"></script>
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.js"></script></html>
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.js"></script>
</body>
</html>
1 change: 0 additions & 1 deletion Redux_FrontEnd/public/vite.svg

This file was deleted.

4 changes: 2 additions & 2 deletions Redux_FrontEnd/src/components/AccountForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import useInput from '../hooks/useInput'
const AccountForm = () => {
const dispatch = useDispatch()
const navigate = useNavigate()
const password = useInput('password',)
const password = useInput('password', 'password',)
const user = useSelector((state,) => state.user,)
const username = useInput('text',)
const username = useInput('text', 'admin',)

const loginHandler = (event,) => {
event.preventDefault()
Expand Down
4 changes: 2 additions & 2 deletions Redux_FrontEnd/src/hooks/useInput.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState, } from 'react'

export default (type,) => {
const [value, setValue,] = useState('',)
export default (type, initialValue,) => {
const [value, setValue,] = useState(initialValue || '',)
const onChange = (event,) => {
setValue(event.target.value,)
}
Expand Down