Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/real api compatible #17

Merged
merged 5 commits into from
Nov 18, 2024
Merged

Feat/real api compatible #17

merged 5 commits into from
Nov 18, 2024

Conversation

Thiniraxz
Copy link
Collaborator

No description provided.

@@ -322,6 +323,11 @@ export const getBlockedAreas = async function* ({
payload,
abortSignal,
})) {
if (chunk.result.objects[0].objectId !== '0') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isnt it better to do optional chaining? using ?. or else if data wasn't present it could lead to errors

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to check in all the files

@@ -322,6 +323,11 @@ export const getBlockedAreas = async function* ({
payload,
abortSignal,
})) {
if (chunk.result.objects[0].objectId !== '0') {
objectId = chunk.result.objects[0].objectId;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isnt it better to do optional chaining? using ?. or else if data wasn't present it could lead to errors

objectId = chunk.result.objects[0].objectId;
continue;
}
chunk.result.objects[0].objectId = objectId;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isnt it better to do optional chaining? using ?. or else if data wasn't present it could lead to errors

@@ -358,6 +371,11 @@ export const getSignalAreas = async function* ({
payload,
abortSignal,
})) {
if (chunk.result.objects[0].objectId !== '0') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isnt it better to do optional chaining? using ?. or else if data wasn't present it could lead to errors

spatialId?: string;
startTime?: string;
endTime?: string;
'windDirection (degree)': number;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope its not recommend to name vairables in this manner. better to rename it to windDirectionDegree

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix in the below other variables as well

startTime?: string;
endTime?: string;
'windDirection (degree)': number;
'windSpeed (knot)': number;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

windDirectionKnot

...definition.currentWeather,
startTime: definition.currentWeather.startTime,
endTime: definition.currentWeather.endTime,
'windDirection (degree)': definition.currentWeather.windDirection,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope its not recommend to name vairables in this manner. better to rename it to windDirectionDegree

@@ -20,7 +20,7 @@ interface Props {
reference: React.RefObject<CesiumComponentRef<Viewer>>;
}
const CurrentWeatherViewer = (props: Props) => {
const [type, setType] = useState<string>('windDirection');
const [type, setType] = useState<string>('windDirection (degree)');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@Rishy20
Copy link
Collaborator

Rishy20 commented Nov 18, 2024

@Thiniraxz Merging it due to urgency, please fix and raise another PR

@Rishy20 Rishy20 merged commit fac0369 into develop Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants