Skip to content
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

Add Home link placement in the header for better accessibility #76

Merged
merged 9 commits into from
Oct 23, 2024
4 changes: 2 additions & 2 deletions apps/web-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@semaphore-protocol/core": "4.3.1",
"@semaphore-protocol/data": "4.3.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to update these versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please tell me how to remove package.json and yarn.lock , should I delete from my repo?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey!

You can delete the package-lock.json file from your repo.

Regarding the yarn.lock file, if you keep the current versions of all the packages, everything should be fine and you won't need to remove this file. To keep the current versions of all the packages you need to have this: "@semaphore-protocol/data": "4.3.1" instead of this: "@semaphore-protocol/data": "^4.4.1" and "next": "14.1.0" instead of "next": "^14.2.15" in the package.json file.

Please let me know if you have any other questions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay i removed both and updated package.json file

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Great! Thank you! Please, could you create an empty yarn.lock file in the root of the project and run the command yarn and push the changes? The yarn.lock file should still be in the repo but this PR shouldn't modify it.

After that, I think the PR is ready.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did it anyway and pushed same yarn.lock which is present in boilerplate repo

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! The new yarn.lock file is almost correct. If you run yarn, it will be updated and you can push the change. The change will be just adding a line at the end of the file.

The yarn.lock file should not be part of these files after you push the change: https://github.com/semaphore-protocol/boilerplate/pull/76/files

Right now it's there: https://github.com/semaphore-protocol/boilerplate/pull/76/files#diff-51e4f558fae534656963876761c95b83b6ef5da5103c4adef6768219ed76c2de

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay changes are complete.

"@semaphore-protocol/data": "^4.4.1",
"ethers": "^6.11.0",
"framer-motion": "^11.0.5",
"next": "14.1.0",
"next": "^14.2.15",
"next-pwa": "^5.6.0",
"react": "^18",
"react-dom": "^18",
Expand Down
44 changes: 25 additions & 19 deletions apps/web-app/src/components/PageContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import shortenString from "@/utils/shortenString"
import { Container, HStack, Icon, IconButton, Link, Spinner, Stack, Text } from "@chakra-ui/react"
import { usePathname } from "next/navigation"
import { FaGithub } from "react-icons/fa"
import NextLink from "next/link"

export default function PageContainer({
children
Expand All @@ -27,25 +28,30 @@ export default function PageContainer({

return (
<>
<HStack align="center" justify="right" p="2">
<Link
href={getExplorerLink(
process.env.NEXT_PUBLIC_DEFAULT_NETWORK as string,
process.env.NEXT_PUBLIC_FEEDBACK_CONTRACT_ADDRESS as string
)}
isExternal
>
<Text>{shortenString(process.env.NEXT_PUBLIC_FEEDBACK_CONTRACT_ADDRESS as string, [6, 4])}</Text>
</Link>
<Link href="https://github.com/semaphore-protocol/boilerplate" isExternal>
<IconButton
aria-label="Github repository"
variant="link"
py="3"
color="text.100"
icon={<Icon boxSize={6} as={FaGithub} />}
/>
</Link>
<HStack align="center" justify="space-between" p="2">
<NextLink href="/">Feedback</NextLink>
<HStack>
<Link
href={getExplorerLink(
process.env.NEXT_PUBLIC_DEFAULT_NETWORK as string,
process.env.NEXT_PUBLIC_FEEDBACK_CONTRACT_ADDRESS as string
)}
isExternal
>
<Text>
{shortenString(process.env.NEXT_PUBLIC_FEEDBACK_CONTRACT_ADDRESS as string, [6, 4])}
</Text>
</Link>
<Link href="https://github.com/semaphore-protocol/boilerplate" isExternal>
<IconButton
aria-label="Github repository"
variant="link"
py="3"
color="text.100"
icon={<Icon boxSize={6} as={FaGithub} />}
/>
</Link>
</HStack>
</HStack>

<Container maxW="xl" flex="1" display="flex" alignItems="center">
Expand Down
Loading