Skip to content

Commit

Permalink
Merge pull request #22 from aaron5670/fix/display-localstorage-value
Browse files Browse the repository at this point in the history
Fix: Don't show current localstorage value if website doesn't have it
  • Loading branch information
aaron5670 authored Jun 28, 2024
2 parents 6b21adb + f0aae2f commit 35b5351
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "statsig-browser-extension",
"displayName": "Statsig Features and Experimentation",
"version": "1.9.0",
"version": "1.9.1",
"description": "A browser extension for the feature management and experimentation platform Statsig.",
"author": "(Aaron van den Berg <[email protected]>)",
"homepage": "https://aaronvandenberg.nl/",
Expand Down
9 changes: 5 additions & 4 deletions src/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ function IndexPopup() {
<img alt="Statsig logo" src={statsigLogo} width={125}/>
</NavbarBrand>
<div>
{hasCustomOverride ? (
{hasCustomOverride && (
<Select
className="min-w-[175px]"
defaultSelectedKeys={[currentLocalStorageValue]}
items={currentOverrides as {name: string}[]}
items={currentOverrides as { name: string }[]}
onChange={(value) => handleOverrides(value.target.value)}
placeholder="No override enabled"
required
Expand All @@ -131,7 +131,8 @@ function IndexPopup() {
</SelectItem>
)}
</Select>
) : (
)}
{currentLocalStorageValue && !hasCustomOverride && (
<>
<p className="text-sm text-gray-700">Current localStorage</p>
<div className="flex items-center gap-2">
Expand All @@ -145,7 +146,7 @@ function IndexPopup() {
/>
</div>
</>
)}
)}
</div>
<Select
className="max-w-[200px]"
Expand Down

0 comments on commit 35b5351

Please sign in to comment.