mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
groups: properly direct mobile navigation in home
This commit is contained in:
parent
0d2a0bae14
commit
26ab2bd51e
@ -29,10 +29,10 @@ type ResourceSkeletonProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function ResourceSkeleton(props: ResourceSkeletonProps) {
|
export function ResourceSkeleton(props: ResourceSkeletonProps) {
|
||||||
const { association, api, children, atRoot } = props;
|
const { association, api, baseUrl, children, atRoot } = props;
|
||||||
const app = association?.metadata?.module || association["app-name"];
|
const app = association?.metadata?.module || association["app-name"];
|
||||||
const appPath = association["app-path"];
|
const appPath = association["app-path"];
|
||||||
const selectedGroup = association["group-path"];
|
const workspace = (baseUrl === '/~landscape/home') ? '/home' : association["group-path"];
|
||||||
const title = props.title || association?.metadata?.title;
|
const title = props.title || association?.metadata?.title;
|
||||||
return (
|
return (
|
||||||
<Col width="100%" height="100%" overflowY="hidden">
|
<Col width="100%" height="100%" overflowY="hidden">
|
||||||
@ -53,7 +53,7 @@ export function ResourceSkeleton(props: ResourceSkeletonProps) {
|
|||||||
my="1"
|
my="1"
|
||||||
display={["block", "none"]}
|
display={["block", "none"]}
|
||||||
>
|
>
|
||||||
<Link to={`/~landscape${selectedGroup}`}> {"<- Back"}</Link>
|
<Link to={`/~landscape${workspace}`}> {"<- Back"}</Link>
|
||||||
</Box>
|
</Box>
|
||||||
) : (
|
) : (
|
||||||
<Box
|
<Box
|
||||||
@ -61,7 +61,7 @@ export function ResourceSkeleton(props: ResourceSkeletonProps) {
|
|||||||
pr={2}
|
pr={2}
|
||||||
mr={2}
|
mr={2}
|
||||||
>
|
>
|
||||||
<Link to={`/~landscape${selectedGroup}/resource/${app}${appPath}`}>
|
<Link to={`/~landscape${workspace}/resource/${app}${appPath}`}>
|
||||||
<Text color="blue">Go back to channel</Text>
|
<Text color="blue">Go back to channel</Text>
|
||||||
</Link>
|
</Link>
|
||||||
</Box>
|
</Box>
|
||||||
|
Loading…
Reference in New Issue
Block a user