relative pathing for bins page
This commit is contained in:
parent
6996ab0e77
commit
e5d4aee4a1
3 changed files with 6 additions and 4 deletions
|
|
@ -49,7 +49,7 @@ export default function BinsList(props: Props) {
|
|||
//const scrollRef = useRef<any>(null);
|
||||
|
||||
const goToBin = (i: number) => {
|
||||
let path = "/bins/" + bins[i].key();
|
||||
let path = bins[i].key();
|
||||
navigate(path, { state: {bin: bins[i]} });
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -634,8 +634,9 @@ export default function Bins(props: Props) {
|
|||
preLoadedData={paginatedBins.bins}
|
||||
rowClickFunction={data => {
|
||||
let bin = data as Bin;
|
||||
let path = "/bins/" + bin.key();
|
||||
navigate(path, { state: { bin: bin }});
|
||||
// let path = "bins/" + bin.key();
|
||||
// navigate(path, { state: { bin: bin }});
|
||||
navigate(bin.key(), { state: { bin: bin }, relative: "path"});
|
||||
}}
|
||||
customButtons={[
|
||||
{
|
||||
|
|
|
|||
|
|
@ -215,7 +215,8 @@ export default function TeamPage() {
|
|||
}
|
||||
|
||||
const toBins = () => {
|
||||
navigate(appendToUrl("bins"))
|
||||
// navigate(appendToUrl("bins"))
|
||||
navigate("bins")
|
||||
}
|
||||
|
||||
const isAg = IsAdaptiveAgriculture()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue