mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-03 06:28:01 +00:00
Compare commits
3 Commits
v2.0.0-beta4
...
v.1.10.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d2b88b626 | |||
| 409bc65427 | |||
| 0ff6556e4d |
@@ -188,3 +188,4 @@ jobs:
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ontime:${{ env.RELEASE_VERSION }} , ${{ secrets.DOCKERHUB_USERNAME }}/ontime:latest
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ontime-ui",
|
||||
"version": "1.9.7",
|
||||
"version": "1.9.8",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@chakra-ui/react": "^2.3.2",
|
||||
|
||||
@@ -11,6 +11,7 @@ export const useFetch = (namespace, fn) => {
|
||||
const { data, status, isError, refetch } = useQuery(namespace, fn, {
|
||||
refetchInterval: refetchIntervalMs,
|
||||
cacheTime: Infinity,
|
||||
networkMode: 'always',
|
||||
});
|
||||
|
||||
return { data, status, isError, refetch };
|
||||
|
||||
@@ -9,6 +9,7 @@ import { EVENTS_TABLE } from '../api/apiConstants';
|
||||
export default function useMutateEvents(mutation){
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation(mutation, {
|
||||
networkMode: 'always',
|
||||
onMutate: async (newEvent) => {
|
||||
// cancel ongoing queries
|
||||
queryClient.cancelQueries(EVENTS_TABLE, { exact: true });
|
||||
|
||||
@@ -30,6 +30,7 @@ export default function EventListWrapper() {
|
||||
const [events, setEvents] = useState(null);
|
||||
|
||||
const addEvent = useMutation(requestPost, {
|
||||
networkMode: 'always',
|
||||
// we optimistically update here
|
||||
onMutate: async (newEvent) => {
|
||||
// cancel ongoing queries
|
||||
@@ -76,6 +77,7 @@ export default function EventListWrapper() {
|
||||
});
|
||||
|
||||
const updateEvent = useMutation(requestPut, {
|
||||
networkMode: 'always',
|
||||
// we optimistically update here
|
||||
onMutate: async (newEvent) => {
|
||||
// cancel ongoing queries
|
||||
@@ -103,6 +105,7 @@ export default function EventListWrapper() {
|
||||
});
|
||||
|
||||
const patchEvent = useMutation(requestPatch, {
|
||||
networkMode: 'always',
|
||||
// we optimistically update here
|
||||
onMutate: async (newEvent) => {
|
||||
// cancel ongoing queries
|
||||
@@ -134,6 +137,7 @@ export default function EventListWrapper() {
|
||||
});
|
||||
|
||||
const deleteEvent = useMutation(requestDelete, {
|
||||
networkMode: 'always',
|
||||
// we optimistically update here
|
||||
onMutate: async (eventId) => {
|
||||
// cancel ongoing queries
|
||||
@@ -163,6 +167,7 @@ export default function EventListWrapper() {
|
||||
});
|
||||
|
||||
const deleteAllEvents = useMutation(requestDeleteAll, {
|
||||
networkMode: 'always',
|
||||
// we optimistically update here
|
||||
onMutate: async () => {
|
||||
// cancel ongoing queries
|
||||
@@ -192,6 +197,7 @@ export default function EventListWrapper() {
|
||||
});
|
||||
|
||||
const applyDelay = useMutation(requestApplyDelay, {
|
||||
networkMode: 'always',
|
||||
// Mutation finished, failed or successful
|
||||
onSettled: () => {
|
||||
queryClient.invalidateQueries(EVENTS_TABLE);
|
||||
@@ -199,6 +205,7 @@ export default function EventListWrapper() {
|
||||
});
|
||||
|
||||
const reorderEvent = useMutation(requestReorder, {
|
||||
networkMode: 'always',
|
||||
// we optimistically update here
|
||||
onMutate: async (data) => {
|
||||
// cancel ongoing queries
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ontime",
|
||||
"version": "1.9.7",
|
||||
"version": "1.10.1",
|
||||
"author": "Carlos Valente",
|
||||
"description": "Time keeping for live events",
|
||||
"repository": "https://github.com/cpvalente/ontime",
|
||||
|
||||
Reference in New Issue
Block a user