Skip to content

feat(web-ui): add navigations #596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion services/web-ui/public/locales/en/create-organization.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
}
},
"description": "By creating a new group you can organize friends and content in one place",
"header": "Create a new group"
"header": "Create a new group",
"links": {
"back": "Back"
}
}
3 changes: 3 additions & 0 deletions services/web-ui/public/locales/en/organization.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"header": "Group",
"links": {
"back": "Back"
},
"members": {
"error": "Unable to retrieve organization members",
"header": "Members",
Expand Down
5 changes: 4 additions & 1 deletion services/web-ui/public/locales/sv/create-organization.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
}
},
"description": "Genom att skapa ny grupp kan du samla vänner och innehåll på en plats",
"header": "Skapa ny grupp"
"header": "Skapa ny grupp",
"links": {
"back": "Tillbaka"
}
}
3 changes: 3 additions & 0 deletions services/web-ui/public/locales/sv/organization.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"header": "Grupp",
"links": {
"back": "Tillbaka"
},
"members": {
"error": "Fel vid hämtning av gruppmedlemmar",
"header": "Medlemmar",
Expand Down
2 changes: 1 addition & 1 deletion services/web-ui/public/locales/sv/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"create-organization": "Skapa ny grupp",
"current-organization": "Nuvarande grupp",
"journal": "Journal",
"list-organizations": "Tillgängliga grupper",
"list-organizations": "Dina grupper",
"new-organization": "Skapa ny grupp"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Box } from "@mui/material";

import { CreateOrganizationCommand } from "src/api";
import { organizationsApi } from "src/apis";
import { NavLayout } from "src/components/layout";
import { Button, TextField, Typography } from "src/components/ui";
import { useForm, validators } from "src/core/forms";
import { useTranslation } from "src/core/i18n";
Expand Down Expand Up @@ -55,11 +56,7 @@ export function CreateOrganizationPageContainer(): ReactElement {
}

return (
<>
<Typography gutterBottom sx={{ paddingTop: 2 }} variant="h5">
{t("header")}
</Typography>

<NavLayout header={t("header")} linkText={t("links.back")} to="/profile">
<Typography color="textSecondary" sx={{ paddingBottom: 3 }}>
{t("description")}
</Typography>
Expand Down Expand Up @@ -91,6 +88,6 @@ export function CreateOrganizationPageContainer(): ReactElement {
</Button>
</Box>
</form>
</>
</NavLayout>
);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { ReactNode } from "react";

import { Typography } from "@mui/material";
import { ReactElement, ReactNode } from "react";

import { NavLayout } from "src/components/layout";
import { useTranslation } from "src/core/i18n";

interface CurrentOrganizationPageNavProps {
Expand All @@ -10,16 +9,12 @@ interface CurrentOrganizationPageNavProps {

export function CurrentOrganizationPageNav({
children,
}: CurrentOrganizationPageNavProps): React.ReactElement {
}: CurrentOrganizationPageNavProps): ReactElement {
const { t } = useTranslation("organization");

return (
<>
<Typography gutterBottom sx={{ paddingTop: 2 }} variant="h5">
{t("header")}
</Typography>

<NavLayout header={t("header")} linkText={t("links.back")} to="/profile">
{children}
</>
</NavLayout>
);
}