Skip to content

Commit

Permalink
feat: add organization page
Browse files Browse the repository at this point in the history
  • Loading branch information
danielstefanequilobe committed Mar 18, 2022
1 parent c4960d4 commit fb2e0b3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/components/blocks/LeftNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Modal,
Body,
} from '../../components';
import { Link } from 'react-router-dom';
import { Link, useHistory } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
import { FormattedMessage, useIntl } from 'react-intl';
import { getMyOrgUid } from '../../utils/getMyOrgUid';
Expand Down Expand Up @@ -66,6 +66,7 @@ const StyledTitleContainer = styled('div')`
`;

const LeftNav = withTheme(({ children }) => {
const history = useHistory();
const [confirmCreateOrgIsVisible, setConfirmCreateOrgIsVisible] =
useState(false);
const [createOrgIsVisible, setCreateOrgIsVisible] = useState(false);
Expand All @@ -89,12 +90,11 @@ const LeftNav = withTheme(({ children }) => {
return () => clearTimeout(intervalId);
}, [myOrgIsNotCreated, myOrgIsCreatedButNotSubscribed, createOrgIsVisible]);

const isUnitsPage = window.location.pathname.includes('/units');
const isProjectsPage = window.location.pathname.includes('/projects');
const isMyRegistryPage = window.location.search.includes('myRegistry=true');
const isOrganizationPage = window.location.pathname.includes('/organization');

console.log('window.location.pathname', window.location.pathname);
const isUnitsPage = history.location.pathname.includes('/units');
const isProjectsPage = history.location.pathname.includes('/projects');
const isMyRegistryPage = history.location.search.includes('myRegistry=true');
const isOrganizationPage =
history.location.pathname.includes('/organization');

return (
<Container>
Expand Down Expand Up @@ -166,7 +166,7 @@ const LeftNav = withTheme(({ children }) => {
<OrganizationIcon height={20} width={20} />
)}
<ButtonText>
<FormattedMessage id="Organization" />
<FormattedMessage id="organization" />
</ButtonText>
</StyledTitleContainer>
{!myOrgIsNotCreated && !myOrgIsCreatedButNotSubscribed && (
Expand Down
3 changes: 2 additions & 1 deletion src/translations/tokens/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,5 +323,6 @@
"creating-organization": "Creating Organization",
"public-address": "Public Address",
"address-qr-code": "Address QR Code",
"my-organization": "My Organization"
"my-organization": "My Organization",
"organization": "Organization"
}
3 changes: 2 additions & 1 deletion src/translations/tokens/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,5 +299,6 @@
"creating-organization": "Creación de Organización",
"public-address": "Direccion publica",
"address-qr-code": "Dirección Código QR",
"my-organization": "Mi organización"
"my-organization": "Mi organización",
"organization": "Organización"
}
3 changes: 2 additions & 1 deletion src/translations/tokens/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,5 +292,6 @@
"creating-organization": "組織の作成",
"public-address": "パブリックアドレス",
"address-qr-code": "住所QRコード",
"my-organization": "私の組織"
"my-organization": "私の組織",
"organization": "組織"
}

0 comments on commit fb2e0b3

Please sign in to comment.