Skip to content

Commit

Permalink
Merge pull request #45 from aaron5670/show-traffic-allocation
Browse files Browse the repository at this point in the history
Show Traffic Allocation in experiment details
  • Loading branch information
aaron5670 authored Jun 19, 2023
2 parents c61a8c4 + af89f60 commit f3df9d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "toggle-experiment",
"displayName": "Toggle Experiment",
"description": "A browser extension to inject the LocalStorage of a website for Optimizely experiments.",
"version": "0.9.0",
"version": "0.10.0",
"author": "Aaron van den Berg",
"homepage": "https://aaronvandenberg.nl/",
"scripts": {
Expand Down
9 changes: 7 additions & 2 deletions src/components/SearchItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ const SearchItem = ({ experiment }: SearchItemProps) => {
fetchExperiment();
}, [opened]);

console.log(experimentData);

const addHistoryItem = async (newItem: HistoryItems) => {
const maxHistoryItems = 3;
const historyItemsLocalStorage = await storage.get("history");
Expand Down Expand Up @@ -137,15 +139,18 @@ const SearchItem = ({ experiment }: SearchItemProps) => {
{loading ? (<Group position="center" my="md"><Loader /></Group>) : (
<Box mb="md">
<Group position="apart" my="xs">
<Group>
<Group position="left">
<Text size="xs" fw={500}>
Status:
</Text>
<Text size="xs" weight={500} color={status.color}>
{status.name}
</Text>
<Text size="xs">
{experimentData?.traffic_allocation / 100}% traffic
</Text>
</Group>
<Text>
<Text size="xs">
<Anchor
href={`https://app.optimizely.com/v2/projects/${experiment.project_id}/experiments/${experiment.id}`}
target="_blank">
Expand Down

0 comments on commit f3df9d0

Please sign in to comment.