This repository was archived by the owner on May 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 183
Amam/websocket page #1719
Merged
Merged
Amam/websocket page #1719
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0ecad6c
feature: add websocket page
cakasuma e26e2c5
build: new endpoint page done
cakasuma 4305fae
fix: remove from sitemap and localization
cakasuma 7589390
fix: apply review suggestions
cakasuma 53f0522
fix: suggestions review on parseJSONString
cakasuma a021196
fix: QA raised issues on validation
cakasuma aca61e7
fix: qa suggestions on placeholders
cakasuma e52d8dc
fix: refactor validation component
cakasuma 1803c8e
fix: resolve conflict
cakasuma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,23 @@ | ||
import { useState, useEffect } from 'react' | ||
import { CookieStorage } from 'common/storage' | ||
import { isNullUndefined, parseJSONString } from 'common/utility' | ||
|
||
export const useCookieState = (defaultValue, key, options) => { | ||
const cookie_state = new CookieStorage(key) | ||
const [value, setValue] = useState(() => { | ||
const sticky_value = cookie_state.get(key) | ||
const result = sticky_value ? parseJSONString(sticky_value) : defaultValue | ||
|
||
return result | ||
}) | ||
|
||
useEffect(() => { | ||
if (isNullUndefined(value)) { | ||
cookie_state.remove() | ||
} else { | ||
cookie_state.set(key, JSON.stringify(value), options) | ||
} | ||
}, [key, value]) | ||
|
||
return [value, setValue] | ||
} |
4 changes: 2 additions & 2 deletions
4
src/components/hooks/dropdown-hooks.js → src/components/hooks/use-dropdown.js
This file contains hidden or 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
File renamed without changes.
File renamed without changes.
This file contains hidden or 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,21 @@ | ||
import { useState, useEffect } from 'react' | ||
import { isBrowser, isNullUndefined, parseJSONString } from 'common/utility' | ||
|
||
export const useLocalStorageState = (defaultValue, key) => { | ||
const [value, setValue] = useState(() => { | ||
const sticky_value = isBrowser() ? window.localStorage.getItem(key) : null | ||
return sticky_value ? parseJSONString(sticky_value) : defaultValue | ||
}) | ||
|
||
useEffect(() => { | ||
if (isBrowser()) { | ||
if (isNullUndefined(value)) { | ||
window.localStorage.removeItem(key) | ||
} else { | ||
window.localStorage.setItem(key, value) | ||
} | ||
} | ||
}, [key, value]) | ||
|
||
return [value, setValue] | ||
} |
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.