Skip to content

Commit

Permalink
Fix query
Browse files Browse the repository at this point in the history
  • Loading branch information
thomlamb committed Oct 11, 2024
1 parent 883919b commit 031f8ea
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,38 @@
import { useNavigate } from "react-router-dom";
import React, { useEffect, useState, useRef } from "react";
import useAxios from "../../../hooks/useAxios";
import useFilterQuery from "../../../hooks/useFilterQuery";
import moment from "moment";
import ReactMarkdown from "react-markdown";
import Spotlight from "spotlight.js";
import "../../../../node_modules/flexbin/flexbin.css";
import { Translate } from "react-translated";
import queryString from "query-string";

const ContactContent = (props) => {
let navigate = useNavigate();
const { u, ...parsed } = Object.assign({
id: queryString.parse(useFilterQuery().toString())["u"],
b_start: 0,
});
const [params, setParams] = useState(parsed);
const [item, setitem] = useState({});
const modalRef = useRef();

function handleClick() {
navigate("..");
onChange(null);
}
const { response, error, isLoading } = useAxios(
{
method: "get",
url: "",
baseURL: props.queryUrl,
headers: {
Accept: "application/json",
},
params: params,
},
[]
);
useEffect(() => {
setParams(parsed);
}, [queryString.parse(useFilterQuery().toString())["u"]]);

return (
<div className="envent-content r-content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const NewsList = (props) => {
.replace(/[^a-zA-Z ]/g, "")
.replace(/\s/g, "-")
.toLowerCase(),
search: `?u=${item.uuid}`,
search: `?u=${item.id}`,
state: {
idItem: item.uuid,
idItem: item.id,
},
}}
></Link>
Expand Down

0 comments on commit 031f8ea

Please sign in to comment.