-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NNS1-3485: new LinkToReporting component (#5965)
# Motivation The new reporting page will be accessible through the `AccountMenu`. This component, which is behind a feature flag, redirects users to this page as long as they are logged in. Deployed [here](https://qsgjb-riaaa-aaaaa-aaaga-cai.yhabib-ingress.devenv.dfinity.network/reporting/) # Changes - New `LinkToReporting` component - Added new component to the `AccountMenu` # Tests - Unit tests for the component within the `AccountMenu` # Todos - [ ] Add entry to changelog (if necessary). Not necessary Prev. PR: #5964
- Loading branch information
Showing
4 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script lang="ts"> | ||
import { beforeNavigate } from "$app/navigation"; | ||
import { i18n } from "$lib/stores/i18n"; | ||
import { IconDocument } from "@dfinity/gix-components"; | ||
import { createEventDispatcher } from "svelte"; | ||
const dispatcher = createEventDispatcher(); | ||
const linkToReporting = "/reporting"; | ||
beforeNavigate(() => dispatcher("nnsLink")); | ||
</script> | ||
|
||
<a data-tid="reporting" href={linkToReporting} class="text"> | ||
<IconDocument /> | ||
{$i18n.navigation.reporting} | ||
</a> | ||
|
||
<style lang="scss"> | ||
@use "../../themes/mixins/account-menu"; | ||
a { | ||
@include account-menu.button; | ||
text-decoration: none; | ||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters