fixing up some mobiles
This commit is contained in:
parent
0b82c15afe
commit
9575d333ad
@ -4,7 +4,6 @@ import { Fab } from '@mui/material';
|
||||
import './CommandEntry.css';
|
||||
|
||||
const CommandEntry = forwardRef(({ setCommand, onSubmitCommand, command }, ref) => {
|
||||
|
||||
return (
|
||||
<div className="commandline" >
|
||||
<input
|
||||
@ -14,7 +13,7 @@ const CommandEntry = forwardRef(({ setCommand, onSubmitCommand, command }, ref)
|
||||
type="text"
|
||||
placeholder="Enter a command!"
|
||||
value={command} />
|
||||
<Fab onClick={ () => onSubmitCommand(command) } >
|
||||
<Fab onClick={ () => { console.log("clicked"); onSubmitCommand(command); }} >
|
||||
Send
|
||||
</Fab>
|
||||
</div>
|
||||
|
@ -72,6 +72,7 @@ function Live({...props}) {
|
||||
setAttributes(fetchAttributesQuery.data);
|
||||
}, [fetchAttributesQuery.data]);
|
||||
|
||||
console.log("is live reloading wrking");
|
||||
// verbs available to us
|
||||
const fetchVerbsQuery = useQuery({
|
||||
queryKey: ['my verbs'],
|
||||
@ -80,12 +81,12 @@ function Live({...props}) {
|
||||
|
||||
let verbs = fetchVerbsQuery.data || [];
|
||||
if (!editing) verbs = ["edit this"].concat(verbs);
|
||||
else verbs = ["save changes"].concat(verbs);
|
||||
else verbs = ["save changes", "discard changes"].concat(verbs);
|
||||
|
||||
const postMutation = useMutation({ // for changing the value when we're done with it
|
||||
mutationFn: postPage,
|
||||
onSettled: async (data, error, variables) => {
|
||||
queryClient.invalidateQueries(['page', variables.number, null])
|
||||
await queryClient.invalidateQueries(['page', variables.number, null])
|
||||
},
|
||||
});
|
||||
|
||||
@ -101,7 +102,9 @@ function Live({...props}) {
|
||||
}
|
||||
|
||||
function handleSubmitCommand() {
|
||||
const c = command.trim();
|
||||
const c = command.trim().toLowerCase();
|
||||
console.log(c);
|
||||
|
||||
if (c == "edit this") setEditing(true);
|
||||
else if (c == "save changes") {
|
||||
saveChanges();
|
||||
|
Loading…
Reference in New Issue
Block a user