Skip to content

Commit

Permalink
feat: handle page refresh logic
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Jan 12, 2024
1 parent e770545 commit ee8978a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/renderer/store/slices/browser/browser.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,6 @@ import { isEqual } from 'lodash';
import { createSlice } from '@reduxjs/toolkit';
import initialState from './browser.initialstate';

interface PageState {
scrollPosition?: { x: number; y: number };
formData?: any;
}

interface VisitPagePayload {
url: string;
title: string;
pageState: PageState;
}

interface HistoryEntry {
url: string;
title: string;
pageState: PageState;
timeStamp: string;
}

export const browserSlice = createSlice({
name: 'browser',
initialState,
Expand Down
17 changes: 17 additions & 0 deletions src/renderer/store/slices/browser/browser.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
interface PageState {
scrollPosition?: { x: number; y: number };
formData?: any;
}

interface VisitPagePayload {
url: string;
title: string;
pageState: PageState;
}

interface HistoryEntry {
url: string;
title: string;
pageState: PageState;
timeStamp: string;
}

0 comments on commit ee8978a

Please sign in to comment.