Skip to content

Commit

Permalink
Show traffic allowance in experiment details
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron5670 committed Jun 19, 2023
1 parent d59b741 commit af89f60
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 af89f60

Please sign in to comment.