From 1e0eb1e83192fee5f02be582c146968dcab64af6 Mon Sep 17 00:00:00 2001 From: shoofle Date: Fri, 20 Sep 2024 12:09:16 -0400 Subject: [PATCH] workin like a worker bee but not keeping track of what i do --- client/src/App.css | 10 ++- client/src/EditPage.jsx | 67 +++++++++--------- client/src/Landing.jsx | 10 +-- client/src/PageView.jsx | 8 ++- client/src/apiTools.jsx | 45 +++++++++++++ client/src/clientStuff.jsx | 55 ++++----------- client/src/jsontrashdeleteme.js | 1 - db/the_big_db.db/dbs/default/data-wal | Bin 449112 -> 461472 bytes db/the_big_db.db/dbs/default/stats.json | 2 +- db/the_big_db.db/dbs/default/wallog | Bin 449144 -> 461504 bytes server/dbHelper.js | 19 ++++++ server/server.js | 86 +++++------------------- 12 files changed, 147 insertions(+), 156 deletions(-) create mode 100644 client/src/apiTools.jsx delete mode 100644 client/src/jsontrashdeleteme.js create mode 100644 server/dbHelper.js diff --git a/client/src/App.css b/client/src/App.css index 3e88ba8f..4223ef20 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -1,5 +1,8 @@ .App { text-align: center; + padding-left: 60vmin; + padding-right: 60vmin; + background-color: #282c34; } .App-logo { @@ -14,7 +17,6 @@ } .App-header { - background-color: #282c34; min-height: 100vh; display: flex; flex-direction: column; @@ -41,6 +43,8 @@ text-align: left; padding: 1em; border: 1px solid black; - - + width: 100%; +} +.Page-contents pre { + width: 100%; } diff --git a/client/src/EditPage.jsx b/client/src/EditPage.jsx index 47275634..024ac25a 100644 --- a/client/src/EditPage.jsx +++ b/client/src/EditPage.jsx @@ -4,7 +4,7 @@ import './App.css'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { useParams, useNavigate } from 'react-router-dom'; import { useState } from 'react'; -import { apiUrl, fetchPage, postPage, deletePage } from './clientStuff.jsx'; +import { apiUrl, fetchPage, postPage, deletePage } from './apiTools.jsx'; function PageView() { const queryClient = useQueryClient(); @@ -56,43 +56,42 @@ function PageView() { navigate(`/`); } - return (
-
- logo -
-

- {pagenumber}. - -

-
- { ready ? - <> -
-
-              
- - - - : +
+ logo +
+

+ {pagenumber}. + +

+
+ { ready ? + <>
- { fetchQuery.isPending ? "Loading..." : JSON.stringify(fetchQuery.error) } +
             
- } -
+ + + + : +
+ { fetchQuery.isPending ? "Loading..." : JSON.stringify(fetchQuery.error) } +
+ } +
); } diff --git a/client/src/Landing.jsx b/client/src/Landing.jsx index b66ea330..cc3111ff 100644 --- a/client/src/Landing.jsx +++ b/client/src/Landing.jsx @@ -1,14 +1,16 @@ import logo from './logo.svg'; import './App.css'; -import { useNavigate } from 'react-router-dom' +import { useNavigate, Link } from 'react-router-dom' import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; -import { apiUrl, fetchPageList, postNewPage } from './clientStuff.jsx'; +import { apiUrl, fetchPageList, postNewPage } from './apiTools.jsx'; +import { useFixLinks } from './clientStuff.jsx'; function Landing() { const queryClient = useQueryClient(); const navigate = useNavigate(); + const noLoad = useFixLinks(); const { isPending, error, data } = useQuery({ // fetch the currrent values queryKey: ['pages'], queryFn: fetchPageList @@ -38,8 +40,8 @@ function Landing() {